←back to thread

320 points willm | 1 comments | | HN request time: 0s | source
Show context
rsyring ◴[] No.45107080[source]
Not too long ago, I read a comment on HN that suggested, due to Python's support for free-threading, async in Python will no longer be needed and will lose out to free-threading due to it's use of "colored" functions. Which seems to align with where this author ends up:

> Because parallelism in Python using threads has always been so limited, the APIs in the standard library are quite rudimentary. I think there is an opportunity to have a task-parallelism API in the standard library once free-threading is stabilized.

> I think in 3.14 the sub-interpreter executor and free-threading features make more parallel and concurrency use cases practical and useful. For those, we don’t need async APIs and it alleviates much of the issues I highlighted in this post.

Armin recently put up a post that goes into those issue in more depth: https://lucumr.pocoo.org/2025/7/26/virtual-threads/

Which lead me to a pre-PEP discussion regarding the possibility of Virtual Threads in Python, which was probably way more than I needed to know but found interesting: https://discuss.python.org/t/add-virtual-threads-to-python/9...

replies(3): >>45107511 #>>45108190 #>>45109395 #
seunosewa ◴[] No.45108190[source]
async was the wrong solution to the right problem - improving general performance. Free threading is the prize in an increasingly multi-core CPU world.
replies(1): >>45113466 #
1. guappa ◴[] No.45113466[source]
Threads use a lot more memory than a single async thread, and if the load is IO, 1 thread is enough.

Speed might be similar but resource usage is not the same at all.