curio
curio copied to clipboard
Docstring for curio.traps._sleep is inaccurate
The docstring for curio.traps._sleep reads:
Sleep until the monotonic clock reaches the specified clock value.
If clock is 0, forces the current task to yield to the next task (if any).
The first line is inaccurate. _sleep does not sleep until the supplied value is less than or equal to "now"; it sleeps for specified value interpreted as a number of seconds, according to the kernel source here: https://github.com/dabeaz/curio/blob/148454621f9bd8dd843f591e87715415431f6979/curio/kernel.py#L541