asyncio get result from coroutine
问题 I have a task make communication between coroutines with help asyncio and python3. Please tell me how to do it,if one coroutine,in while tru cycle , return value at different intervals, and the other coroutines receives this data import asyncio @asyncio.coroutine def write(future): i=0 while True: yield from asyncio.sleep(1) future.set_result('data: '.format(i)) i+=1 def got_result(future): print(future.result()) loop = asyncio.get_event_loop() future = asyncio.Future() asyncio.ensure_future