← All terms · Async & concurrency
GIL
Global Interpreter Lock — CPython's mutex that lets only one thread run Python bytecode at a time. Threads still help for I/O; for CPU, use processes.
Learn this interactively:
Open lesson sr-30 →Related — Async & concurrency
async defDeclares a coroutine. Can be awaited; runs cooperatively on an event loop.awaitPauses a coroutine until another coroutine/Future finishes. Only legal inside `a…Event loopScheduler that drives async code — runs ready coroutines, parks blocked ones. `a…asyncio.gatherRun multiple coroutines concurrently and wait for all of them. The bread-and-but…