Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring for curio.traps._sleep is inaccurate #370

Open
zbentley opened this issue Oct 14, 2024 · 0 comments · May be fixed by #371
Open

Docstring for curio.traps._sleep is inaccurate #370

zbentley opened this issue Oct 14, 2024 · 0 comments · May be fixed by #371

Comments

@zbentley
Copy link

zbentley commented Oct 14, 2024

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')

@zbentley zbentley linked a pull request Oct 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant