()
| 227 | both_inside = asyncio.Event() |
| 228 | |
| 229 | async def read() -> None: |
| 230 | nonlocal readers |
| 231 | async with lock.read_lock(timeout=10): |
| 232 | readers += 1 |
| 233 | if readers == 2: |
| 234 | both_inside.set() |
| 235 | await asyncio.wait_for(both_inside.wait(), 10) |
| 236 | |
| 237 | await asyncio.gather(read(), read()) |
| 238 | await lock.close() |
no test coverage detected