ren
ren

Reputation: 3993

leveldb thread safety: reading in one thread, writing through another

I have created one DB instance and would like to use it from different threads: one for reading through an iterator and another for writing. Would that be thread-safe or do I need to protect the object with locks?

Upvotes: 3

Views: 990

Answers (1)

ren
ren

Reputation: 3993

It seems that would be safe. What wouldn't be safe is to use same iterator in different threads.

Upvotes: 1

Related Questions