3 ms·
> In the general case waiting for a syscall to return will block the system thread and no other green thread is going to be able to run on it. The runtime will
by wyager 10y ago
> In the general case waiting for a syscall to return will block the system thread and no other green thread is going to be able to run on it.
The runtime will migrate pending green thread actions to other OS threads. I don't remember what happens if you have as many blocked FFI calls as OS threads. The runtime might spawn more if you're using RTS -N. If you have RTS -Nn, where n is a number, I imagine it does block.