Y
Hacker News
new
|
ask
|
show
|
jobs
by
yankput
996 days ago
Virtual threads are strictly better than normal threads, no? I am thinking of any reason to still use traditional threads. Is there any downside?
1 comments
papercrane
996 days ago
Currently virtual threads aren't a good match if you have a CPU heavy workload. The scheduler isn't fair and if your code doesn't enter into any blocking code it won't be unmounted from the carrier thread.
link
yankput
996 days ago
Ahh. It makes sense. But it’s much better fit for file io/sockets/db.
link
YeBanKo
996 days ago
Why would you use virtual threads for CPU heavy loads?
link
kelnos
996 days ago
You wouldn't. The GP was illustrating a situation where virtual threads are not a good substitute for native threads.
link