3 ms·
You can interrupt blocking IO calls using signals, so there is an alternative to using epoll/select for this. It can also be used to implement timeouts if anoth
by Matthias247 3y ago
You can interrupt blocking IO calls using signals, so there is an alternative to using epoll/select for this. It can also be used to implement timeouts if another userspace thread tracks the IO operation duration and sends a signal to the IO blocked thread if the max duration has expired.
I think Java thread interruption for blocking IO might be based on signals and is not using nonblocking IO under the hood. But I would need to read JDK source again to tell for sure
- girvo 3y agoYeah signals is what I’ve seen too, though I’m unsure if newlib + FreeRTOS has enough to make ‘em work! I’ll have a look though.