Re: [Async-sig] await question

2018-12-10 Thread Pradip Caulagi
Thanks Nathaniel, Dima! On Mon, Dec 10, 2018 at 7:45 PM Nathaniel Smith wrote: > > Yeah, 'await' makes it *possible* for the function you're calling to return > control to the event loop, but returning is still an explicit action that the > function has to take. > > In asyncio, the only

Re: [Async-sig] await question

2018-12-10 Thread Dima Tisnek
While on the subject of referenced documentation, I find that it too conflates concurrency with parallelism. I don't have a good fix in mind though. Any takers? ___ Async-sig mailing list Async-sig@python.org

Re: [Async-sig] await question

2018-12-10 Thread Nathaniel Smith
Yeah, 'await' makes it *possible* for the function you're calling to return control to the event loop, but returning is still an explicit action that the function has to take. In asyncio, the only operation that actually returns control to the event loop is awaiting a Future object. In Trio, we

Re: [Async-sig] await question

2018-12-10 Thread Dima Tisnek
No, in this case fib(1) is resolved instantly, thus it's caller is resolved instantly, thus... On Mon, 10 Dec 2018 at 9:28 PM, Pradip Caulagi wrote: > I was wondering if every use of 'await' should return the control to > event loop? So in this example - >

[Async-sig] await question

2018-12-10 Thread Pradip Caulagi
I was wondering if every use of 'await' should return the control to event loop? So in this example - https://gist.github.com/caulagi/3edea8cf734495f2592528a48f99e1d2 - I was hoping I would see 'A', 'B' to be mixed, but I see only 'A' followed by 'B'. What am I missing? I am using Python 3.7.1.