Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)

Paul Rubin <[email protected]> Sat, 14 Jun 2025 18:25:26 -0700
Newsgroups comp.lang.python
Organization A noiseless patient Spider
Message-ID <[email protected]>
Lawrence D'Oliveiro <[email protected]> writes:
>> Try using Erlang a little,  It has preemptive lightweight processes and
>> it is great.  Much better than async/await imho.
>
> Those are called “threads”. Python already has those, and the ongoing 
> “noGIL” project will make them even more useful.

Erlang's lightweight processes are called "processes" rather than
"threads" since they don't give the appearance of having shared memory.
They communicate by passing data through channels.  From the
application's perspective, that is always done by copying the data,
although the VM sometimes optimizes away the copying behind the scenes.

Python has OS threads but they are way more expensive than Erlang
processes.  Programming with them in an Erlang-like style still can work
pretty well.