Thanks Howard,
I might still borrow a few minutes from you for the followings
> No. MDB_NOTLS has no relevance to rw txns. The docs state quite clearly that
> it only
> affects read-only txns. Read more carefully.
Sorry I had a typo in the previous reply, I meant to say "ro txn". Let me
rephrase the whole question: I create an LMDB env with MDB_NOTLS, and open a
readonly txn from this env with "mdb_txn_begin" and flag "MDB_RDONLY". Then I
open N cursors from this readonly txn, namely cursor_0, cursor_1, ...,
cursor_{N-1}; meanwhile my application can use M threads. So if I guarantee
that, at any times, *at most 1* of the M threads is accessing *one of* the N
cursors, then my application is thread-safe in using LMDB.
Is this correct understanding?
> Read more carefully.
One may interpret it in many ways, like "cursors might not outlive a txn's
lifecycle", or "cursor and its transaction might not be accessed by different
threads". I'd appreciate if it can be more clarified.
Thanks,
Xiaoya