summaryrefslogtreecommitdiff
path: root/kombu
diff options
context:
space:
mode:
Diffstat (limited to 'kombu')
-rw-r--r--kombu/clocks.py4
-rw-r--r--kombu/compat.py3
2 files changed, 5 insertions, 2 deletions
diff --git a/kombu/clocks.py b/kombu/clocks.py
index a45bc767..aecb68fb 100644
--- a/kombu/clocks.py
+++ b/kombu/clocks.py
@@ -11,7 +11,7 @@ Logical Clocks and Synchronization.
from __future__ import absolute_import
from __future__ import with_statement
-from threading import Lock
+import threading
__all__ = ['LamportClock']
@@ -57,7 +57,7 @@ class LamportClock(object):
def __init__(self, initial_value=0):
self.value = initial_value
- self.mutex = Lock()
+ self.mutex = threading.Lock()
def adjust(self, other):
with self.mutex:
diff --git a/kombu/compat.py b/kombu/compat.py
index 88874aad..88aedaa9 100644
--- a/kombu/compat.py
+++ b/kombu/compat.py
@@ -19,6 +19,9 @@ from .entity import Exchange, Queue
__all__ = ['Publisher', 'Consumer']
+# XXX compat attribute
+entry_to_queue = Queue.from_dict
+
def _iterconsume(connection, consumer, no_ack=False, limit=None):
consumer.consume(no_ack=no_ack)