[Date Prev][Date Next]
Re: LMDB and writes
On 09/08/14 03:56, Bill Hastings wrote:
Just getting my feet wet with LMDB. Is it possible for multiple
threads write into LMDB concurrently?
No. Only one write transaction can be active at a time,
and each transaction belongs to one thread. See lmdb.h.
> Or should writes be serialized to LMDB?
lmdb does that, so you don't need to.
Except if you use the MDB_NOLOCK flag. Then I think you can
use a transaction across threads. But there must still be only
one write transaction, and you must enusre that and manage
concurrency and synchronization between threads yourself.
Likely not what you want, in particular as an LMDB beginner.