[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
RE: question on write transaction
Thanks for pointing me out
-----Original Message-----
From: Howard Chu [mailto:hyc@symas.com]
Sent: Tuesday, August 4, 2015 9:46 AM
To: Shu, Xinxin; openldap-technical@openldap.org
Subject: Re: question on write transaction
Shu, Xinxin wrote:
> Hi list, recently I wrote app on LMDB, found that for every write , lmdb lock a global lock when transaction is created , and release this lock in mdb_txn_commit, on Ubuntu, this lock is implemented by pthread_mutext_t. in my app, I create write transaction in a thread, then commit this write transaction in another thread, since lmdb use pthread_mutex_unlock to release this lock, according to manual , attempting to unlock the mutex if it was not locked by the calling thread results in undefined behavior, then my app cannot create write transaction . So does this issue known to community or is there any way to work around?
This is already documented.
http://symas.com/mdb/doc/group__mdb.html#gad7ea55da06b77513609efebd44b26920
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/