Re:The Various Kinds of IO – Blocking, Non-Blocking, Multipl...
by magnat on Monday May 07, 2018 @03:29AM
(#17010959)
> On the IO completing, the OS will suspend your thread, and execute your callback.
On Windows, you have to put your thread to sleep to receive any callbacks [1]. If OS would suspend your thread at random point to execute a callback, that could lead to hard-to-detect/debug deadlocks and race conditions.
On Windows, you have to put your thread to sleep to receive any callbacks [1]. If OS would suspend your thread at random point to execute a callback, that could lead to hard-to-detect/debug deadlocks and race conditions.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...