3 ms·
You don't technically need two ways to start threads. That's how Java does it, and there's some technical reason for it that I always forget. There are edge cas
by mike_hearn 3y ago
You don't technically need two ways to start threads. That's how Java does it, and there's some technical reason for it that I always forget. There are edge cases where virtual and physical threads aren't completely interchangeable.
- tsimionescu 3y agoYou need to know if you're opening an OS thread or a virtual thread if you intend to interact with the OS natively. For example, if you want to call a C library that expects to control and block its thread, you need to ensure you are running on a dedicated OS thread, otherwise you might block all available threads.