Skip to content

Commit

Permalink
TeamSpen210 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Redoubts committed Sep 28, 2024
1 parent 0a0b23c commit 4892f66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trio/_timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ def move_on_after(
)


async def sleep_forever() -> NoReturn: # type: ignore[misc]
async def sleep_forever() -> NoReturn:
"""Pause execution of the current task forever (or until cancelled).
Equivalent to calling ``await sleep(math.inf)``.
"""
await trio.lowlevel.wait_task_rescheduled(lambda _: trio.lowlevel.Abort.SUCCEEDED)
raise trio.TrioInternalError("Should never have been rescheduled!")

Check warning on line 68 in src/trio/_timeouts.py

View check run for this annotation

Codecov / codecov/patch

src/trio/_timeouts.py#L68

Added line #L68 was not covered by tests


async def sleep_until(deadline: float) -> None:
Expand Down

0 comments on commit 4892f66

Please sign in to comment.