run
run
#
run_call — one memoized call, in three steps.
- Ask the scratch for the key's memo (the three answers); results are served.
- On nothing, claim the key under its per-call lock and ask again: of any number of callers arriving together exactly one gets past this point, the rest block until it seals and then hit.
- Compute in a fresh workspace, as a step named after the function, then seal what the body returned.
run_call(key, identity, label, returns, body)
#
The results of the call key: served from the scratch, or computed and sealed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
CallKey
|
The call's cache key. |
required |
identity
|
str
|
The function's cache identity, under which the call reports itself. |
required |
label
|
str
|
The function's name, which the call's step shows. |
required |
returns
|
ReturnSpec
|
The declared return type(s). |
required |
body
|
Callable[[], object]
|
The undecorated call, run only when nothing is sealed for |
required |