News for hackers. Stuff that matters.
Re:Python Asyncio: The Complete Guide by number6 on Thursday November 10, 2022 @01:41PM (#33551123)
I only know C#: https://learn.microsoft.com/en-us/dotnet/csharp/async#recogn...

There you also have to act differently based the task

Re:Python Asyncio: The Complete Guide by dekhn on Thursday November 10, 2022 @01:59PM (#33551368)
The docs on that page explicitly say you just have to provide a different parameter (basically, to force it to use a thread-like instead of select-like approach).

The docs on that page also point you to a different task library which does what I'd expect:

"If the work is appropriate for concurrency and parallelism, also consider using the Task Parallel Library."

I checked those docs and that is a framework that makes sense.

Re:Python Asyncio: The Complete Guide by phs2501 on Thursday November 10, 2022 @02:20PM (#33551639)
Not sure how that's different than Python asyncio's "run blocking stuff with `run_in_executor`, the result (future) of which integrates into the async event loop?
Re:Python Asyncio: The Complete Guide by dekhn on Thursday November 10, 2022 @04:10PM (#33553418)
it's threaded with the option to use 1:M, N:N or N:M. It's a mental model that includes both asyncio and threads, while async will always only be for IO-blocking calls that can be multiplexed.