From e541155a1235c3d010a837a9e1f7806d03836854 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 29 Oct 2013 15:23:19 +0000 Subject: QPID-5139: Add timeout argument to python messaging.Session.commit. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1536750 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid/messaging/endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qpid/python') diff --git a/qpid/python/qpid/messaging/endpoints.py b/qpid/python/qpid/messaging/endpoints.py index d686f0dd77..7cd3931465 100644 --- a/qpid/python/qpid/messaging/endpoints.py +++ b/qpid/python/qpid/messaging/endpoints.py @@ -708,7 +708,7 @@ class Session(Endpoint): self._ecwait(lambda: not [m for m in messages if m in self.acked]) @synchronized - def commit(self): + def commit(self, timeout=None): """ Commit outstanding transactional work. This consists of all message sends and receives since the prior commit or rollback. @@ -717,7 +717,7 @@ class Session(Endpoint): raise NontransactionalSession() self.committing = True self._wakeup() - self._ecwait(lambda: not self.committing) + self._ecwait(lambda: not self.committing, timeout=timeout) if self.aborted: raise TransactionAborted() assert self.committed -- cgit v1.2.1