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

Method slow_provider

tests/lib/test_credentials.py:1785–1789  ·  view source on GitHub ↗
(*, force_refresh: bool = False)

Source from the content-addressed store, hash-verified

1783 barrier = _threading.Barrier(8)
1784
1785 def slow_provider(*, force_refresh: bool = False) -> AccessToken: # noqa: ARG001
1786 provider_calls.append(1)
1787 # Hold the refresh long enough for the other threads to queue up.
1788 time.sleep(0.1)
1789 return AccessToken(token="fresh", expires_at=None)
1790
1791 cache = TokenCache(slow_provider)
1792 results: List[str] = []

Callers

nothing calls this directly

Calls 3

AccessTokenClass · 0.90
sleepMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected