concurrency.py
This file
Path
tests/concurrency.py
15 lines · 324 bytes · Python
Last changed by
Not known.
History of this fileTake it
The walk stopped after 200 commits: lines older than 978e5bb point at it.
Bump types-chardet from 5.0.3 to 5.0.4.2 (#2613)dependabot[bot]before adoption978e5bb
lines 1–15why, one step back1"""2Async environment-agnostic concurrency utilities that are only used in tests.3"""45import asyncio67import sniffio8import trio91011async def sleep(seconds: float) -> None:12 if sniffio.current_async_library() == "trio":13 await trio.sleep(seconds) # pragma: no cover14 else:15 await asyncio.sleep(seconds)