News for hackers. Stuff that matters.
Re:Python Asyncio: The Complete Guide by qbasic_forever on Thursday November 10, 2022 @11:41AM (#33549143)
Async python by design is not concurrent, nothing is executing at the same time on different cores/threads. There's one worker loop and one task running on it at a time.
Re:Python Asyncio: The Complete Guide by _bohm on Thursday November 10, 2022 @11:45AM (#33549211)
I think you mean it is not parallel. Cooperative multitasking is absolutely a type of concurrency
Re:Python Asyncio: The Complete Guide by srik on Thursday November 10, 2022 @11:55AM (#33549410)
Concurrency is not Parallelism. You should watch this quintessential talk about the difference - https://www.youtube.com/watch?v=oV9rvDllKEg
Re:Python Asyncio: The Complete Guide by dekhn on Thursday November 10, 2022 @02:07PM (#33551461)
This is Rob's perspective, but it's not universally shared. In my mind, all concurrency is a form of parallelism (parallel tasks, but not parallel threads) while not all parallelism is concurrency. I have frequently solved concurrency problems with thread pools, rather than using non-blocking IO, because the programming paradigm is a lot simpler.
Re:Python Asyncio: The Complete Guide by BerislavLopac on Tuesday November 15, 2022 @03:32PM (#33614614)
You got the the wrong way round: all parallelism is a form of concurrency.

In Python, thread pools and async work mostly the same in practice, except that threads have a bigger overhead. So they can be used to solve the same problems.