3 ms·
They are async across operations that do 'yield', i.e. when the function eventually runs an i/o operation or sleep or similar. Those are the points where the fu
by rcxdude 11mo ago
They are async across operations that do 'yield', i.e. when the function eventually runs an i/o operation or sleep or similar. Those are the points where the functions can be interleaved. Simply awaiting another function is _not_ one of those points: await here only means the called function might yield to the scheduler at some point in its execution (it doesn't have to!), not that the calling function will yield immediately.
- fluoridation 11mo agoIsn't asyncio.sleep one of those functions? "other" should be able to appear between "parent before" and "parent after".
- rcxdude 11mo agoYes, but not between "parent before" and "child start" (or between "child end" and "parent after")
- fluoridation 11mo agoAh, OK. That makes sense.