notes
scratchpad · phemantics.xyz
Python concurrency · the series
-
01 The GIL is Not Your Enemy
Refcounting, the 5ms handoff, and what the lock actually protects.
-
02 The Loop is the Trick
epoll, coroutines,
_run_once, and the Task spine that drives them.
-
03 Asyncio Sidequests
The self-pipe, signals, debug mode,
asyncio.run, contextvars, uvloop.
-
04 The Two-Way Door
Generators,
send, throw, yield from, and what await desugars to.
-
05 Scopes and Checkpoints
anyio 101 — cancel scopes, checkpoints, task groups, memory streams.
-
06 Two Ways to Cancel
The pre-armed peek and the task group that quietly turns it into a lie.
-
07 Servers, in Earnest
Putting the loop to work behind a real request-serving stack.
Python concurrency · standalones
DSA · stock span