Skip to content
Myr

concurrency.py

This file

Path

tests/concurrency.py

15 lines · 323 bytes · Python

Last changed by

Not known.

History of this file

Take it

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

Included create_ssl_context function to create the same context with SSLConfig and serve as API (#996)Can Sarıgölbefore adoption926a55a

lines 1–15why, one step back
1"""
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: nocover14 else:15 await asyncio.sleep(seconds)