This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import trio | |
from typing import AsyncIterator, Awaitable, Callable, Coroutine, Optional, TypeVar | |
A = TypeVar("A") | |
B = TypeVar("B") | |
async def yield_with_delay(val, delay): | |
for i in range(5): | |
await trio.sleep(delay) |