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 : janburse (at) *nospam* fastmail.fm (Mild Shock)
Groupes : comp.lang.python
Date : 14. Jun 2025, 22:23:23
Autres entêtes
Message-ID : <102kp89$q8c6$1@solani.org>
References : 1
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0 SeaMonkey/2.53.21
Concerning virtual threads the only problem
with Java I have is, that JDK 17 doesn't have them.
And some linux distributions are stuck with JDK 17.
Otherwise its not an idea that belongs solely
to Java, I think golang pioniered them with their
goroutines. I am planning to use them more heavily
when they become more widely available, and I don't
see any principle objection that Python wouldn't
have them as well. It would make async I/O based
on async waithing for a thread maybe more lightweight.
But this would be only important if you have a high
number of tasks.
Lawrence D'Oliveiro schrieb:
Short answer: no.
 <https://discuss.python.org/t/add-virtual-threads-to-python/91403>
 Firstly, anybody appealing to Java as an example of how to design a
programming language should immediately be sending your bullshit detector
into the yellow zone.
 Secondly, the link to a critique of JavaScript that dates from 2015, from
before the language acquired its async/await constructs, should be another
warning sign.
 Looking at that Java spec, a “virtual thread” is just another name for
“stackful coroutine”. Because that’s what you get when you take away
implicit thread preemption and substitute explicit preemption instead.
 The continuation concept is useful in its own right. Why not concentrate
on implementing that as a new primitive instead?
 

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