MCPcopy Create free account
hub / github.com/github/copilot-sdk / _wait_for_condition

Function _wait_for_condition

python/e2e/test_client_lifecycle_e2e.py:25–32  ·  view source on GitHub ↗
(predicate, timeout: float = 10.0)

Source from the content-addressed store, hash-verified

23
24
25async def _wait_for_condition(predicate, timeout: float = 10.0) -> None:
26 deadline = asyncio.get_running_loop().time() + timeout
27 while True:
28 if predicate():
29 return
30 if asyncio.get_running_loop().time() >= deadline:
31 raise TimeoutError("condition was not met before timeout")
32 await asyncio.sleep(0.05)
33
34
35async def _wait_for_last_session_id(client) -> str:

Calls 1

predicateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…