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

Function gated

tests/lib/tools/memory_sync/test_two_pass.py:94–100  ·  view source on GitHub ↗
(memory_id: str, **kwargs: Any)

Source from the content-addressed store, hash-verified

92 second_started = anyio.Event()
93
94 async def gated(memory_id: str, **kwargs: Any) -> Any:
95 if memory_id == "mem:a.md":
96 with anyio.fail_after(10):
97 await second_started.wait()
98 else:
99 second_started.set()
100 return await real_retrieve(memory_id, **kwargs)
101
102 memories.retrieve = gated
103 await run_sync(stores)

Callers

nothing calls this directly

Calls 2

waitMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected