Skip to content

Docstring for curio.traps._sleep is inaccurate #370

@zbentley

Description

@zbentley

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:

set_timeout(clock + time_monotonic(), 'sleep')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions