3 ms·
It does yield control. As far as I know, that's "how you're supposed to it". But the example is not great because there is no other task available to switch to,
by drhagen 10mo ago
It does yield control. As far as I know, that's "how you're supposed to it". But the example is not great because there is no other task available to switch to, so the event loop goes right back to where it left off. While the text says otherwise, I'm pretty sure the same thing would happen in JS, C#, and Java.
- adammarples 10mo agoRight I understand now, thanks