Actually bare `yield` works too. On Sun, Oct 25, 2015 at 6:55 AM, Andrew Svetlov <andrew.svet...@gmail.com> wrote:
> `asyncio.sleep(0)` is equal to bare yield in coroutine. > > On Sun, Oct 25, 2015 at 4:51 PM, Imran Geriskovan > <imran.gerisko...@gmail.com> wrote: > > We have routines which may take long calculation times > > in an async application. > > > > - Does simply "yield" ing at certain points in long running > > code, give the event loop the opportunity to handle > > waiting async events, and reschedule long running calculation? > > > > - In the new "def async/await" syntax, "yield" is not even allowed. > > What is the best way of giving such breaks with new syntax? > > > > Regards, > > Imran > > > > -- > Thanks, > Andrew Svetlov > -- --Guido van Rossum (python.org/~guido)