qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1536750 - /qpid/trunk/qpid/python/qpid/messaging/endpoints.py
Date Tue, 29 Oct 2013 15:23:19 GMT
Author: aconway
Date: Tue Oct 29 15:23:19 2013
New Revision: 1536750

URL: http://svn.apache.org/r1536750
Log:
QPID-5139: Add timeout argument to python messaging.Session.commit.

Modified:
    qpid/trunk/qpid/python/qpid/messaging/endpoints.py

Modified: qpid/trunk/qpid/python/qpid/messaging/endpoints.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging/endpoints.py?rev=1536750&r1=1536749&r2=1536750&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/messaging/endpoints.py (original)
+++ qpid/trunk/qpid/python/qpid/messaging/endpoints.py Tue Oct 29 15:23:19 2013
@@ -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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message