diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2016-05-16 19:39:39 (GMT) |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2016-05-16 19:39:39 (GMT) |
commit | 8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb (patch) | |
tree | a4d780ee11c4d8732b927c8271eb5427428fb39c /Lib/asyncio/locks.py | |
parent | 7c3ac2d1f82ed44a90de34d5bc6424c64b19ce68 (diff) | |
parent | 7661db622892c9731c502ccdd7af130cbfd23f5c (diff) | |
download | cpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.zip cpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.tar.gz cpython-8ace2c66d35cf4cbb2d4a6383e33c0bb96448ecb.tar.bz2 |
Merge 3.5 (Issue #27041)
Diffstat (limited to 'Lib/asyncio/locks.py')
-rw-r--r-- | Lib/asyncio/locks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py index 34f6bc1..1804d7b 100644 --- a/Lib/asyncio/locks.py +++ b/Lib/asyncio/locks.py @@ -170,7 +170,7 @@ class Lock(_ContextManagerMixin): self._locked = True return True - fut = futures.Future(loop=self._loop) + fut = self._loop.create_future() self._waiters.append(fut) try: yield from fut @@ -258,7 +258,7 @@ class Event: if self._value: return True - fut = futures.Future(loop=self._loop) + fut = self._loop.create_future() self._waiters.append(fut) try: yield from fut @@ -320,7 +320,7 @@ class Condition(_ContextManagerMixin): self.release() try: - fut = futures.Future(loop=self._loop) + fut = self._loop.create_future() self._waiters.append(fut) try: yield from fut @@ -433,7 +433,7 @@ class Semaphore(_ContextManagerMixin): True. """ while self._value <= 0: - fut = futures.Future(loop=self._loop) + fut = self._loop.create_future() self._waiters.append(fut) try: yield from fut |