MCPcopy Index your code
hub / github.com/python/cpython / wait_for_event

Method wait_for_event

Lib/_pyrepl/windows_console.py:553–564  ·  view source on GitHub ↗

Wait for an event.

(self, timeout: float | None)

Source from the content-addressed store, hash-verified

551 return e
552
553 def wait_for_event(self, timeout: float | None) -> bool:
554 """Wait for an event."""
555 if timeout is None:
556 timeout = INFINITE
557 else:
558 timeout = int(timeout)
559 ret = WaitForSingleObject(InHandle, timeout)
560 if ret == WAIT_FAILED:
561 raise WinError(get_last_error())
562 elif ret == WAIT_TIMEOUT:
563 return False
564 return True
565
566 def wait(self, timeout: float | None) -> bool:
567 """

Callers 1

waitMethod · 0.95

Calls 2

WinErrorFunction · 0.90
get_last_errorFunction · 0.85

Tested by

no test coverage detected