Purpose of asyncio.wait_for()

Viewed 17131

As far as I understand, yielding from a coroutine in a coroutine passes thread control to the event loop.

The event loop then does some kind of scheduling between other coroutines (among them, the coroutine that is yielded from) and at some point, the coroutine that called yield from will be resumed.

How's is that any different from wrapping the coroutine in an ansyncio.wait_for call and yielding from the latter one?

1 Answers
Related