Small but important correction to condition variable protocol!
After setting self._transaction, release the lock. Then reacquire it before the notify(). The wait() call is sufficient to block the other threads; holding the lock is not necessary. As a result, it doesn't matter if the same thread calls tpc_begin() and tpc_abort() for a given transaction. So remove assertion.
Showing
Please register or sign in to comment