MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / blocking

Function blocking

tests/lib/tools/test_session_runner.py:1076–1079  ·  view source on GitHub ↗
(_input: object)

Source from the content-addressed store, hash-verified

1074@ON_A_REAL_CLOCK
1075def test_sync_tool_runs_off_the_event_loop(backend: str) -> None:
1076 def blocking(_input: object) -> str:
1077 loop_ran = threading.Event()
1078 anyio.from_thread.run_sync(loop_ran.set)
1079 return str(loop_ran.wait(5))
1080
1081 steps = [*requiring_action(A), (0, "exhaust_retries")]
1082

Callers

nothing calls this directly

Calls 1

waitMethod · 0.45

Tested by

no test coverage detected