If you don't have the latest asyncio version, change `ensure_future` to `async`.<p>> asyncio.async(display_date(1, loop))<p>See this <a href="https://github.com/python/asyncio/pull/242" rel="nofollow">https://github.com/python/asyncio/pull/242</a><p>The author is using the latest release of asyncio, will be good to mention that.
Anyone know when most of the python stdlib (the batteries included part) will start itself using async/await (for any/all things that could block)?? I suppose it will never change due to backwards compat. (which feels odd...)?
Async is not new. life has been doing it for millennia. Your heart does not stop beating while you breathe, yet both systems are interrelated. The body accomplishes this through the use of 'buffers'. Pause one system long enough and the other will fail. So we have evolved a 'scheduler' - the hindbrain that starts to scream louder and louder when the event queue of one system becomes too long. It might be instructive to model this in silicon. Have one cpu core be the scheduler. Have every set of interrelated processes (that are Async) register their variables with the scheduler. The scheduler then keeps track of these sets. When a variable in a set changes, pause that process for two cycles.
A good article, but it should mention async network programming (probably with <a href="http://www.tornadoweb.org/" rel="nofollow">http://www.tornadoweb.org/</a>) which is the major driving use case behind the adoption of async programming patterns.