Skip to content
Myr

concurrency.py

This file

Path

tests/concurrency.py

15 lines · 323 bytes · Python

Last changed by

Increase test coverage - take 2 (#1012)Josep Cugatbefore adoption620b067

History of this file

Take it

The walk stopped after 200 commits: lines older than e19bd9b point at it.

Dispatcher -> AsyncDispatcher (#725)Tom Christiebefore adoptione19bd9b

line 1why, one step back
1"""

Remove unused concurrency test utils (#989)Florimond Mancabefore adoption440b5ab

line 2why, one step back
2Async environment-agnostic concurrency utilities that are only used in tests.

Dispatcher -> AsyncDispatcher (#725)Tom Christiebefore adoptione19bd9b

lines 3–10why, one step back
3"""
45import asyncio67import sniffio8import trio910

Remove unused concurrency test utils (#989)Florimond Mancabefore adoption440b5ab

line 11why, one step back
11async def sleep(seconds: float) -> None:

Dispatcher -> AsyncDispatcher (#725)Tom Christiebefore adoptione19bd9b

line 12why, one step back
12 if sniffio.current_async_library() == "trio":

Increase test coverage - take 2 (#1012)Josep Cugatbefore adoption620b067

line 13why, one step back
13 await trio.sleep(seconds) # pragma: nocover

Dispatcher -> AsyncDispatcher (#725)Tom Christiebefore adoptione19bd9b

lines 14–15why, one step back
14 else:
15 await asyncio.sleep(seconds)