[Python-ideas] Async context managers and iterators with tulip
Nick Coghlan
ncoghlan at gmail.com
Sun Dec 23 06:48:00 CET 2012
On Sun, Dec 23, 2012 at 2:03 AM, Guido van Rossum <guido at python.org> wrote:
> On Sat, Dec 22, 2012 at 4:57 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
>> On balance, I consider it better than offering only greenlet-style
>> implicit switching (which is effectively equivalent to preemptive
>> threading, since any function call or operator may suspend the task).
>> I'm also a lot happier about it since realising that the model of
>> emitting futures and using "yield from f" where synchronous code would
>> use "f.result()" helps unify the two worlds.
>
> I wouldn't go so far as to call that unifying, but it definitely helps
> people transition. Still, from experience with introducing NDB's async
> in some internal App Engine software, it takes some getting used to
> even for the best of developers. But it is worth it.
Yes, "unify" was the wrong word - "align" would be better.
Cheers,
Nick.
--
Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
More information about the Python-ideas
mailing list