(self, event: Event, timeout: int)
| 176 | raise Exception("timed out waiting for unlock signal: deadlock?") |
| 177 | |
| 178 | def wait(self, event: Event, timeout: int): |
| 179 | if _IS_SYNC: |
| 180 | return event.wait(timeout) # type: ignore[call-arg] |
| 181 | else: |
| 182 | try: |
| 183 | asyncio.wait_for(event.wait(), timeout=timeout) |
| 184 | except asyncio.TimeoutError: |
| 185 | return False |
| 186 | return True |
| 187 | |
| 188 | |
| 189 | if __name__ == "__main__": |
no test coverage detected