3 ms·
> tells the OS we want to read some data and then waits for the data to be ready No, it tells the OS "schedule the current thread to wake up when the data read
by otabdeveloper4 5mo ago
> tells the OS we want to read some data and then waits for the data to be ready
No, it tells the OS "schedule the current thread to wake up when the data read task is completed".
Having to implement that with other OS primitives is a) complex and error-prone, and b) not atomic.
- Izkata 5mo agoThe application in question is frozen for that period though, that's the wait they're referring to. Even websites had this problem with freezing the browser in the early AJAX days, when people would do a synchronous XMLHttpRequest without understanding it.