()
| 202 | inside = peak = 0 |
| 203 | |
| 204 | async def write() -> None: |
| 205 | nonlocal inside, peak |
| 206 | async with lock.write_lock(): |
| 207 | inside += 1 |
| 208 | peak = max(peak, inside) |
| 209 | await asyncio.sleep(0) |
| 210 | inside -= 1 |
| 211 | progress.put_nowait(None) |
| 212 | |
| 213 | writers = [asyncio.create_task(write()) for _ in range(10)] |
| 214 | # A shared deadline can expire during ten slow disk flushes on Windows. |
no test coverage detected