Hi
I'm trying to learn asyncio. so far i stuck on this situation: how can i
run a coroutine between another one?
Maybe i didn't get the concept of asyncio but please enlighten me!
import asyncio
import time
loop = asyncio.get_event_loop()
@asyncio.coroutine
def sleepy():
print("before sleep", time.time())
yield from asyncio.sleep(3)
print("after sleep", time.time())
@asyncio.coroutine
def test():
print("this should run between!")
Now how can i run test while sleepy already began and sleeping for 3
seconds?
I want output like:
before sleep
this should run between!
after sleep