[Python-ideas] async objects

Nathaniel Smith njs at pobox.com
Fri Oct 7 02:42:25 EDT 2016


On Thu, Oct 6, 2016 at 4:12 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Nathaniel Smith wrote:
>>
>> The core distinguishing feature between
>> async/await and gevent is the visibility of suspension points, so it
>> might as well be the case that async/await is designed for exactly
>> those people who want visible suspension points.
>
>
> They're not quite independent axes, though. Gevent is based
> on greenlet, which relies on some slightly dubious tricks at
> the C level and doesn't play well with some external libraries.
>
> As far as I know, there's no current alternative that's just
> as efficient and portable as asyncio but without the extra
> keywords. If you want the full benefits of asyncio, you're
> forced to accept explicit suspension points.

I'd be interested to hear more about this. gevent/greenlet don't seem
to have an official "list of supported platforms" that I can find, but
I can't find concrete examples of unsupported platforms either. Are we
talking like, HPUX-on-MIPS or...? And obviously there are always going
to be some cases that are better supported by either one tool or
another, but as we've seen getting external libraries to play well
with asyncio is also pretty non-trivial (exactly because of those
explicit suspension points!), and my impression was that for now
gevent actually had a larger ecosystem. For folks who prefer the
gevent API, is it really easier to port libraries to asyncio than to
port them to gevent?

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Python-ideas mailing list