summaryrefslogtreecommitdiff
path: root/python/qpid/driver.py
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-09-02 15:35:42 +0000
committerRafael H. Schloming <rhs@apache.org>2009-09-02 15:35:42 +0000
commit9c0a76ef0159743bb58d288c89a7e2faf5be11be (patch)
tree5ac5d688dfbc6ee67deb5296f3e3272eef07e14a /python/qpid/driver.py
parente6b63285996dc65cb214ab94f55676f48f80188b (diff)
downloadqpid-python-9c0a76ef0159743bb58d288c89a7e2faf5be11be.tar.gz
changed Lockable -> Waiter and switched its usage from has-a to is-a; also fixed some more imports
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@810573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid/driver.py')
-rw-r--r--python/qpid/driver.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/python/qpid/driver.py b/python/qpid/driver.py
index 2f56a6008e..a759588572 100644
--- a/python/qpid/driver.py
+++ b/python/qpid/driver.py
@@ -18,11 +18,11 @@
#
import compat, connection, socket, sys, time
+from concurrency import synchronized
from datatypes import RangedSet, Message as Message010
from exceptions import Timeout
-from lockable import synchronized, Lockable
from logging import getLogger
-from messaging import get_codec, Message, Pattern, UNLIMITED
+from messaging import get_codec, ConnectError, Message, Pattern, UNLIMITED
from ops import delivery_mode
from session import Client, INCOMPLETE, SessionDetached
from threading import Condition, Thread
@@ -63,12 +63,11 @@ def delegate(handler, session):
return handler._message_transfer(session, cmd)
return Delegate
-class Driver(Lockable):
+class Driver:
def __init__(self, connection):
self.connection = connection
self._lock = self.connection._lock
- self._condition = self.connection._condition
self._wakeup_cond = Condition()
self._socket = None
self._conn = None
@@ -134,7 +133,7 @@ class Driver(Lockable):
self.connection.error = (msg,)
self._modcount = modcount
- self.notifyAll()
+ self.connection._waiter.notifyAll()
def connect(self):
if self._conn is not None:
@@ -177,7 +176,7 @@ class Driver(Lockable):
_ssn.auto_sync = False
_ssn.invoke_lock = self._lock
_ssn.lock = self._lock
- _ssn.condition = self._condition
+ _ssn.condition = self.connection._condition
if ssn.transactional:
# XXX: adding an attribute to qpid.session.Session
_ssn.acked = []
@@ -422,7 +421,7 @@ class Driver(Lockable):
rcv.received += 1
log.debug("RECV [%s] %s", ssn, msg)
ssn.incoming.append(msg)
- self.notifyAll()
+ self.connection._waiter.notifyAll()
return INCOMPLETE
def _decode(self, message):