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

Method worker

tests/lib/test_credentials.py:1800–1804  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1798 lock = _threading.Lock()
1799
1800 def worker() -> None:
1801 barrier.wait()
1802 tok = cache.get_token()
1803 with lock:
1804 results.append(tok)
1805
1806 threads = [_threading.Thread(target=worker) for _ in range(8)]
1807 for t in threads:

Calls 3

get_tokenMethod · 0.80
waitMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected