]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove Semaphore.io_loop.
authorA. Jesse Jiryu Davis <jesse@mongodb.com>
Wed, 25 Feb 2015 20:54:46 +0000 (15:54 -0500)
committerA. Jesse Jiryu Davis <jesse@mongodb.com>
Wed, 25 Feb 2015 20:54:46 +0000 (15:54 -0500)
tornado/locks.py

index a6d99be426a40168fa921975e1631ea5ef7c36b6..b7312190a75bb7e7e96ebe85831e1f4bc69014f7 100644 (file)
@@ -167,7 +167,6 @@ class Semaphore(object):
         if value < 0:
             raise ValueError('semaphore initial value must be >= 0')
 
-        self.io_loop = ioloop.IOLoop.current()
         self._value = value
         self._waiters = collections.deque()
 
@@ -209,7 +208,7 @@ class Semaphore(object):
             waiter = Future()
             self._waiters.append(waiter)
             if timeout:
-                future = gen.with_timeout(timeout, waiter, self.io_loop,
+                future = gen.with_timeout(timeout, waiter,
                                           quiet_exceptions=gen.TimeoutError)
 
                 # Set waiter's exception after the deadline.