Thanks. So is the libuv package implemented as two distinct components then consisting of:
1) The main event loop thread.
2) a thread pool of "workers" which make the actual I/O request and sleep while waiting for the I/O. Then when a "worker" thread is set to runnable again by the kernel(because it's I/O request has been completed)notifies the main event loop thread via a signal?
Comments
Thanks. So is the libuv package implemented as two distinct components then consisting of:
1) The main event loop thread.
2) a thread pool of "workers" which make the actual I/O request and sleep while waiting for the I/O. Then when a "worker" thread is set to runnable again by the kernel(because it's I/O request has been completed)notifies the main event loop thread via a signal?
Is that correct?
That's correct, except the notification back is probably via some queue (think of futures or Go channels) rather than signals.
I see that makes sense. Cheers.