update from Atlas with major reorg
This commit is contained in:
14
attic/futures/coroutine_purgatory.py
Normal file
14
attic/futures/coroutine_purgatory.py
Normal file
@@ -0,0 +1,14 @@
|
||||
@asyncio.coroutine
|
||||
def three_phases():
|
||||
response1 = yield from fetch1(request1)
|
||||
# phase 1
|
||||
request2 = step1(response1)
|
||||
response2 = yield from fetch2(request2)
|
||||
# phase 2
|
||||
request3 = step2(response2)
|
||||
response3 = yield from fetch3(request3)
|
||||
# phase 3
|
||||
step3(response3)
|
||||
|
||||
|
||||
loop.create_task(three_phases)
|
||||
Reference in New Issue
Block a user