Message226964
And as a last comment, just for completeness, a complete
async console. With it you can do cool things like
>>> from asyncio import sleep, async
>>> def f():
... yield from sleep(3)
... print("done")
>>> yield from f()
[after 3 seconds]
done
>>> async(f())
>>> [wait another 3 seconds] done
Just see how async puts something in the background, while
yield from keeps it up, and how the event loop runs even
while we're doing nothing!
Let's hope other projects out there are more open to making
their event loops asyncio-compatible than CPython is -
otherwise asyncio will soon cease to exist. |
|
Date |
User |
Action |
Args |
2014-09-16 19:51:05 | Martin.Teichmann | set | recipients:
+ Martin.Teichmann, gvanrossum, vstinner, yselivanov |
2014-09-16 19:51:05 | Martin.Teichmann | set | messageid: <1410897065.14.0.531836344651.issue22412@psf.upfronthosting.co.za> |
2014-09-16 19:51:05 | Martin.Teichmann | link | issue22412 messages |
2014-09-16 19:51:05 | Martin.Teichmann | create | |
|