summaryrefslogtreecommitdiff
path: root/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
commita4997c62017ab9ff9f3c9ebf54f65d412cb24ce9 (patch)
tree71b73af6b2bb74c8fbd1a0f256ea9265d62937bd /python
parent9ac04db0e5c94e82bd2af6a031310df5789ed514 (diff)
downloadqpid-python-a4997c62017ab9ff9f3c9ebf54f65d412cb24ce9.tar.gz
QPID-5139: Add timeout argument to python messaging.Session.commit.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1536750 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/messaging/endpoints.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/qpid/messaging/endpoints.py b/python/qpid/messaging/endpoints.py
index d686f0dd77..7cd3931465 100644
--- a/python/qpid/messaging/endpoints.py
+++ b/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