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

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.
Ahh. It makes sense. But it’s much better fit for file io/sockets/db.
Why would you use virtual threads for CPU heavy loads?
You wouldn't. The GP was illustrating a situation where virtual threads are not a good substitute for native threads.