You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2008/05/09 23:41:24 UTC
svn commit: r654947 - /incubator/qpid/trunk/qpid/python/qpid/session.py
Author: rhs
Date: Fri May 9 14:41:24 2008
New Revision: 654947
URL: http://svn.apache.org/viewvc?rev=654947&view=rev
Log:
QPID-947: made python client use execution.sync instead of session.flush when not in auto_sync mode
Modified:
incubator/qpid/trunk/qpid/python/qpid/session.py
Modified: incubator/qpid/trunk/qpid/python/qpid/session.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/session.py?rev=654947&r1=654946&r2=654947&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/session.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/session.py Fri May 9 14:41:24 2008
@@ -93,7 +93,8 @@
def sync(self, timeout=None):
if currentThread() == self.channel.connection.thread:
raise SessionException("deadlock detected")
- self.channel.session_flush(completed=True)
+ if not self.auto_sync:
+ self.execution_sync()
last = self.sender.next_id - 1
if not wait(self.condition, lambda:
last in self.sender._completed or self.exceptions,
@@ -250,6 +251,9 @@
if result is not INCOMPLETE:
for seg in segments:
self.receiver.completed(seg)
+ # XXX: don't forget to obey sync for manual completion as well
+ if hdr.sync:
+ self.channel.session_completed(self.receiver._completed)
def send(self, seg):
self.sender.send(seg)