couchbaselabs / cbforest

C++ wrapper library around ForestDB, for use in Couchbase Lite.
17 stars 12 forks source link

Multiple Transactions on same Database* cause assertion failure in thread-safe mode #99

Closed snej closed 8 years ago

snej commented 8 years ago

If two threads try to create a transaction on the same Database object, the second one will hit this assertion failure. The mutex works for two threads on different Database objects (on the same db file), but not when they're the same object.

(Note that this is only a valid operation when C4DB_THREADSAFE is defined at build time, since otherwise threads can't access the same objects at all.)

snej commented 8 years ago

Never mind -- this isn't actually correct.