import asyncio
@asyncio.coroutine
def simple_coroutine():
yield from asyncio.sleep(1)
print(threading.get_ident())
print(threading.get_ident())
asyncio.get_event_loop().run_until_complete(simple_coroutine())
The above Python code prints out the same thread id, so I guess coroutines are scheduled in an event loop, which is maintained by a single thread. Am I right? and if I am right, does my guess applies to the concept of coroutine in other languages than Python?