summaryrefslogtreecommitdiff
path: root/Lib/asyncio/windows_events.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-06-29 00:46:45 +0200
committerVictor Stinner <victor.stinner@gmail.com>2014-06-29 00:46:45 +0200
commita8e0cac0aa70a448051834937b4654f49b1557da (patch)
treeaa181422f937d190adad2eaf80fc6b05069d539e /Lib/asyncio/windows_events.py
parent51d3e2330ecbf461bb158a7d1cd76fdfbc5fd9a7 (diff)
downloadcpython-a8e0cac0aa70a448051834937b4654f49b1557da.tar.gz
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.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/asyncio/windows_events.py b/Lib/asyncio/windows_events.py
index 19f25882cd..93b71b2a13 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: