|
Does ZoneTree support multi threads writing to the same database? e.g. Create single database instance and share it among threads in a thread pool. Threads can read or write to the database. |
Answered by
koculu
Oct 15, 2024
Replies: 1 comment
|
Yes, it does. Please also consider the following in multi-threaded use-cases:
|
0 replies
Answer selected by
koculu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, it does.
ZoneTree synchronizes the writes and reads internally and you don't have to worry about synchronization at all.
The following read/write methods are thread-safe:
ContainsKey, Upsert, TryGet, TryAdd, TryDelete, ForceDelete, Count
Please also consider the following in multi-threaded use-cases: