Skip to content

Does ZoneTree support multi threads writing to the same database? #98

Answered by koculu
aley1 asked this question in Q&A
Discussion options

You must be logged in to vote

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:

  • Thread safety does not guarantee data consistency.
  • Data consistency does not imply thread safety.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by koculu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants