Hacker News new | ask | show | jobs
by 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.
2 comments

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.