[Date Prev][Date Next] [Chronological] [Thread] [Top]

mdb_dbi_open and threads



Hi,
I have been using LMDB for over a year now.
It has been a wonderful experience.
A great thank you for the wonderful work that you guys have done.

Till now I have used it on the main thread. And for the info, I only make use of LMDB named dbi.

I was trying to make it work in threads. Reading the docs on mdb_dbi_open got me confused. The doc says

"
     * The database handle will be private to the current transaction until
     * the transaction is successfully committed.
"
and

"
     * This function must not be called from multiple concurrent
     * transactions in the same process. A transaction that uses
     * this function must finish (either commit or abort) before
     * any other transaction in the process may use this function.
"


I use MDB_NOTLS.
Does the doc mean I can't simultaneously read the same named dbi from multiple threads because I have to wait for readers in other threads to commit before starting a read of the same named dbi?