def newTransaction(self, tx): thread = threading.current_thread() self._tx_start[thread] = self.timestamp = make_timestamp() # we check out the objects we've activated in a previous # transaction and which haven't been retracted to a shared # state; this allows the local state to catch up on changesets for obj in self._connected: obj._p_checkout()
def beforeCompletion(self, tx): self.timestamp = make_timestamp() self._tx_start[threading.current_thread()] = None if self._unconnected: transaction.get().join(self)