4 ms·
Await pushes your task onto the end of the event queue; this might seem like you’re immediately executing a future in many cases but it’s not true in all cases.
by tylerhou 8y ago
Await pushes your task onto the end of the event queue; this might seem like you’re immediately executing a future in many cases but it’s not true in all cases. Other futures created by your thread might take priority. Consider the case where you pushed a future onto the event loop which infinite loops before you used await. Then your code will freeze.