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

Liste des GroupesRevenir à cl python 
Sujet : Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.python
Date : 15. Jun 2025, 03:13:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <102la8c$l3km$5@dont-email.me>
References : 1 2 3 4
User-Agent : Pan/0.162 (Pokrosvk)
On Sat, 14 Jun 2025 18:25:26 -0700, Paul Rubin wrote:

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.

Sharing process context is cheaper than having to keep copying data back
and forth. Clever tricks with the paging hardware can often be more
trouble than they’re worth.

Remember, Python’s threads are OS threads. If you’re thinking “expensive”,
you must be assuming “Microsoft Windows”.

Date Sujet#  Auteur
14 Jun 25 * Does Python Need Virtual Threads? (Posting On Python-List Prohibited)17Lawrence D'Oliveiro
14 Jun 25 +* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)10Paul Rubin
15 Jun 25 i`* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)9Lawrence D'Oliveiro
15 Jun 25 i `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)8Paul Rubin
15 Jun 25 i  `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)7Lawrence D'Oliveiro
15 Jun 25 i   `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Paul Rubin
15 Jun 25 i    `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)5Lawrence D'Oliveiro
15 Jun 25 i     `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)4Paul Rubin
16 Jun 25 i      `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)3Lawrence D'Oliveiro
16 Jun 25 i       `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)2Paul Rubin
17 Jun 25 i        `- Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)1Lawrence D'Oliveiro
14 Jun 25 `* Re: Does Python Need Virtual Threads? (Posting On Python-List Prohibited)6Mild Shock
23 Jun 25  `* async I/O via threads is extremly slow (Was: Does Python Need Virtual Threads?)5Mild Shock
23 Jun 25   `* What does stats = await asyncio.to_thread(os.stat, url) do? (Was async I/O via threads is extremly slow)4Mild Shock
23 Jun 25    `* What does the Async Detour usually cost (Was: What does stats = await asyncio.to_thread(os.stat, url) do?)3Mild Shock
23 Jun 25     `* Which Python System is affected? (Was: What does the Async Detour usually cost)2Mild Shock
24 Jun 25      `- Schachner, Joseph was the Big Moron [September 2021 16:30] (Was: Which Python System is affected?)1Mild Shock

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal