From 179d0447f1e8c02e8c16209f69a9319ff512eddd Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 24 Apr 2014 01:26:55 +0300 Subject: [PATCH] asyncio: Add asyncio.async() dummy factory function. Not Task bloat implemented (so far?), so just identity function for CPython compatibility. --- asyncio/asyncio.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/asyncio/asyncio.py b/asyncio/asyncio.py index 827d9252..caf07949 100644 --- a/asyncio/asyncio.py +++ b/asyncio/asyncio.py @@ -160,6 +160,10 @@ class IOWrite(SysCall): def get_event_loop(): return EpollEventLoop() +def async(coro): + # We don't have Task bloat, so op is null + return coro + def sleep(secs): yield Sleep("sleep", secs)