Don't use self._transaction.
It's not thread-safe to store a Transaction() object in an instance variable without some sort of locking. Nor is it desirable to use the same transaction object for more than one transaction. So get rid of all uses of self._transaction and replace with a local variable.
Showing
Please register or sign in to comment