summaryrefslogtreecommitdiff
path: root/qpid/python
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-10-29 15:23:19 +0000
committerAlan Conway <aconway@apache.org>2013-10-29 15:23:19 +0000
commite541155a1235c3d010a837a9e1f7806d03836854 (patch)
tree293f5e39c20b25af94b920303b3cb2bcd5ee4839 /qpid/python
parent1ed2dda65e8d6f901c63d22231464778b5da1a99 (diff)
downloadqpid-python-e541155a1235c3d010a837a9e1f7806d03836854.tar.gz
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
Diffstat (limited to 'qpid/python')
-rw-r--r--qpid/python/qpid/messaging/endpoints.py4
1 files changed, 2 insertions, 2 deletions
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