diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-05-30 01:09:16 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-05-30 01:09:16 +0000 |
commit | 13d4004774b8ea14e8ef1614bea7105122878748 (patch) | |
tree | 96a4e80196ab4f1d5601be1636d6a6936cd246e1 /lib/sqlalchemy/queue.py | |
parent | 5ea1d673151a2a94b41d3131345464dfddaea95b (diff) | |
download | sqlalchemy-13d4004774b8ea14e8ef1614bea7105122878748.tar.gz |
removed needless "thread" imports from util
Diffstat (limited to 'lib/sqlalchemy/queue.py')
-rw-r--r-- | lib/sqlalchemy/queue.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/sqlalchemy/queue.py b/lib/sqlalchemy/queue.py index 37e772547..c9ab82acf 100644 --- a/lib/sqlalchemy/queue.py +++ b/lib/sqlalchemy/queue.py @@ -1,7 +1,7 @@ """An adaptation of Py2.3/2.4's Queue module which supports reentrant behavior, using RLock instead of Lock for its mutex object. -This is to support the connection pool's usage of ``__del__`` to return +This is to support the connection pool's usage of weakref callbacks to return connections to the underlying Queue, which can apparently in extremely rare cases be invoked within the ``get()`` method of the Queue itself, producing a ``put()`` inside the ``get()`` and therefore a reentrant @@ -9,7 +9,7 @@ condition.""" from collections import deque from time import time as _time - +from sqlalchemy.util import threading __all__ = ['Empty', 'Full', 'Queue'] @@ -30,10 +30,6 @@ class Queue: If `maxsize` is <= 0, the queue size is infinite. """ - try: - import threading - except ImportError: - import dummy_threading as threading self._init(maxsize) # mutex must be held whenever the queue is mutating. All methods # that acquire mutex must release it before returning. mutex |