diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-06-28 22:47:28 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-06-28 22:47:28 (GMT) |
commit | 6cdcf0d5ed565c5ec3a36331e64fbf230550543a (patch) | |
tree | f8ecb5acfd3e9b5999d3ed7bd42eefba8282f177 /Lib/asyncio/windows_events.py | |
parent | 41c8da95f4ed6e08e6f904ee11ca7cef074541a9 (diff) | |
parent | f951d28ac890063e3ecef56aa8cf851b1152d9dd (diff) | |
download | cpython-6cdcf0d5ed565c5ec3a36331e64fbf230550543a.zip cpython-6cdcf0d5ed565c5ec3a36331e64fbf230550543a.tar.gz cpython-6cdcf0d5ed565c5ec3a36331e64fbf230550543a.tar.bz2 |
(Merge 3.4) asyncio: sync with Tulip, add a new asyncio.coroutines module
Diffstat (limited to 'Lib/asyncio/windows_events.py')
-rw-r--r-- | Lib/asyncio/windows_events.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py index 19f2588..93b71b2 100644 --- a/Lib/asyncio/windows_events.py +++ b/Lib/asyncio/windows_events.py @@ -14,8 +14,9 @@ from . import proactor_events from . import selector_events from . import tasks from . import windows_utils -from .log import logger from . import _overlapped +from .coroutines import coroutine +from .log import logger __all__ = ['SelectorEventLoop', 'ProactorEventLoop', 'IocpProactor', @@ -129,7 +130,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop): def _socketpair(self): return windows_utils.socketpair() - @tasks.coroutine + @coroutine def create_pipe_connection(self, protocol_factory, address): f = self._proactor.connect_pipe(address) pipe = yield from f @@ -138,7 +139,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop): extra={'addr': address}) return trans, protocol - @tasks.coroutine + @coroutine def start_serving_pipe(self, protocol_factory, address): server = PipeServer(address) @@ -172,7 +173,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop): self.call_soon(loop) return [server] - @tasks.coroutine + @coroutine def _make_subprocess_transport(self, protocol, args, shell, stdin, stdout, stderr, bufsize, extra=None, **kwargs): @@ -258,7 +259,7 @@ class IocpProactor: conn.settimeout(listener.gettimeout()) return conn, conn.getpeername() - @tasks.coroutine + @coroutine def accept_coro(future, conn): # Coroutine closing the accept socket if the future is cancelled try: |