[Python-ideas] [asyncio] Suggestion for a major PEP

Steven D'Aprano steve at pearwood.info
Sun Dec 16 04:44:34 EST 2018

On Sun, Dec 16, 2018 at 09:21:14AM +0100, Christophe Bailly wrote:

> Async/Await logic has introduced a symetric relation wich introduces
> unnecessary contraints. We should just the same logic as thread logic.

I'm not an expert on async, but whenever I hear people saying "we should 
use (something just like) threads" I'm reminded of something that Jamie 
Zawinski could have (but didn't) say:

    Some people, when confronted with a problem, think "I know, I'll 
    use threads." Nothwey htwo pavroble ems.

I know, that's a sound-bite, not a reasoned argument. But if your 
intention is to make async code just like threads, how do you avoid 
the well-known perils of threading?

The point of async code is to make context switches explicit, rather 
than implicit like threading. So at first glance, it seems like you are 
suggesting we take the major benefit of async (explicitness) and replace 
it with the major disadvantage of other concurrency models (implicitness).


More information about the Python-ideas mailing list