python:asyncio
This is an old revision of the document!
ASYNCIO
Asyncio uses cooperative multitasking to achieve concurrency. When our application reaches a point where it could wait a while for a result to come back, we explicitly mark this in code.
async - let us to define a coroutine.
await - let us pause our coroutine when we have a long-running operation. Blocking operation.
Task - wraps a coroutine and schedules it to run on the event loop immediately (in the background)
python/asyncio.1765552253.txt.gz · Last modified: by v1ctor
