Hacker News new | past | comments | ask | show | jobs | submit login

> 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.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: