Dense, fork-local runtime state for SCI contexts.
Stable handles are assigned integer slots once per context lineage. A world stores slot values densely and a frozen fork copies that array while the source world is quiescent. Mutable primitives CAS only their own slot, so unrelated atoms never contend on a shared world root.
Dense, fork-local runtime state for SCI contexts. Stable handles are assigned integer slots once per context lineage. A world stores slot values densely and a frozen fork copies that array while the source world is quiescent. Mutable primitives CAS only their own slot, so unrelated atoms never contend on a shared world root.
(active-ctx captured)Use the currently evaluating descendant context for an interpreted closure. Unrelated SCI contexts cannot capture one another accidentally.
Use the currently evaluating descendant context for an interpreted closure. Unrelated SCI contexts cannot capture one another accidentally.
(attach-managed-owner! registry managed-index owner)Attach weak ownership after constructing a self-described handle. The owner is never retained strongly by the lineage registry.
Attach weak ownership after constructing a self-described handle. The owner is never retained strongly by the lineage registry.
(binding-scope)Return the currently executing world for dynamic-binding isolation. Nil denotes a host binding established outside managed SCI evaluation.
Return the currently executing world for dynamic-binding isolation. Nil denotes a host binding established outside managed SCI evaluation.
(call-with-context ctx f)Run f with ctx installed as both SCI's dynamic context and active world.
This is the host invocation boundary for interpreted values that outlive the
top-level evaluation which produced them.
Run `f` with `ctx` installed as both SCI's dynamic context and active world. This is the host invocation boundary for interpreted values that outlive the top-level evaluation which produced them.
(call-with-var-context handle f)Run f in the active related world for handle, or in the Var's stable
home world when invoked directly by the host. Shared built-in Vars have no
home and retain their direct compatibility behavior.
Run `f` in the active related world for `handle`, or in the Var's stable home world when invoked directly by the host. Shared built-in Vars have no home and retain their direct compatibility behavior.
(fork-recovery? error)Whether a failure retains an unpublished fork target for cleanup retry.
Whether a failure retains an unpublished fork target for cleanup retry.
(-fork-world-cache! owner source target)Copy an existing source realization into the unpublished target without invoking deferred computation. Missing source state remains missing.
Copy an existing source realization into the unpublished target without invoking deferred computation. Missing source state remains missing.
(-retire-world-cache! owner world)Release this managed owner's cache for one quiescent retired world. This internal hook only removes private cache entries: no user callbacks or I/O. It must be idempotent so failed retirement can be retried.
Release this managed owner's cache for one quiescent retired world. This internal hook only removes private cache entries: no user callbacks or I/O. It must be idempotent so failed retirement can be retried.
(-mark-world-tracked! handle home-ctx)(-world-home-ctx handle)(-world-tracked? handle)(managed-assoc! home registry slot k value)Associate one key in a managed persistent-map slot without the generic callback/validation path. Used by mutable SCI deftype fields.
Associate one key in a managed persistent-map slot without the generic callback/validation path. Used by mutable SCI deftype fields.
(managed-compare-and-set! home registry slot expected new validate! notify!)(managed-compare-and-set! home
registry
slot
expected
new
validate!
notify!
coordination)(managed-compare-and-set! home
registry
slot
expected
new
validate!
notify!
coordination
validation-current?)(managed-reset! home registry slot new validate! notify!)(managed-reset! home registry slot new validate! notify! coordination)(managed-reset! home
registry
slot
new
validate!
notify!
coordination
validation-current?)(managed-swap! home registry slot f args validate! notify!)(managed-swap! home registry slot f args validate! notify! coordination)(managed-swap! home
registry
slot
f
args
validate!
notify!
coordination
validation-current?)CAS a directly described slot. The logical fallback represents a slot allocated in another branch but not yet realized in the selected world.
CAS a directly described slot. The logical fallback represents a slot allocated in another branch but not yet realized in the selected world.
(managed-update-control-with-value! home
registry
value-slot
control-slot
coordination
validate-value!
update-control)Atomically validate the selected value and update a related control slot.
coordination must be the same stable handle used by value commits.
Atomically validate the selected value and update a related control slot. `coordination` must be the same stable handle used by value commits.
(managed-value home registry slot)Read a self-described managed slot in the active related world, falling back to the owner's creation world outside managed evaluation.
Read a self-described managed slot in the active related world, falling back to the owner's creation world outside managed evaluation.
(managed-value-in world home slot)Read a managed slot from an already selected world.
Read a managed slot from an already selected world.
(recover-failed-fork! error)Retry cleanup of the unpublished target retained by a failed SCI fork. Never re-executes the fork or changes its source. A subsequent cleanup failure retains the same target and original failure for another retry.
Retry cleanup of the unpublished target retained by a failed SCI fork. Never re-executes the fork or changes its source. A subsequent cleanup failure retains the same target and original failure for another retry.
(register-managed! kind values fork-indexes)Allocate dense slots whose owner carries the returned descriptor directly.
Managed descriptors contain no owner reference, so an unreachable SCI ref is
not retained by the lineage registry. fork-indexes names values that need
host Forkable/:fork-fn processing when a child world is copied.
Allocate dense slots whose owner carries the returned descriptor directly. Managed descriptors contain no owner reference, so an unreachable SCI ref is not retained by the lineage registry. `fork-indexes` names values that need host `Forkable`/`:fork-fn` processing when a child world is copied.
(register-world-cache! owner)Register an identity-based internal owner of fork-local realizations. The lineage index retains the owner weakly and does not allocate dense slots. Owners must implement both cache protocols and must not use content-based hashing/equality (in particular, the owner is not a sequence view).
Register an identity-based internal owner of fork-local realizations. The lineage index retains the owner weakly and does not allocate dense slots. Owners must implement both cache protocols and must not use content-based hashing/equality (in particular, the owner is not a sequence view).
(retire-world! world)Retire one interpreter world at a quiescent boundary. New evaluations and forks are refused. Managed cache owners release their world-specific state; this does not close foreign host resources or retire sibling worlds. Safe to repeat after partial cleanup; keep the context until retirement succeeds.
Retire one interpreter world at a quiescent boundary. New evaluations and forks are refused. Managed cache owners release their world-specific state; this does not close foreign host resources or retire sibling worlds. Safe to repeat after partial cleanup; keep the context until retirement succeeds.
(selected-world)The actual selected world, including the target selected during copying.
The actual selected world, including the target selected during copying.
(slot-of world handle)Return the value slot assigned to handle, or nil when it is not registered
in this lineage. Intended for analyzer-time resolution.
Return the value slot assigned to `handle`, or nil when it is not registered in this lineage. Intended for analyzer-time resolution.
(swap-value! handle f args validate! notify!)Atomically update one tracked slot. Unrelated SCI atoms do not contend and
cannot cause f to be retried.
Atomically update one tracked slot. Unrelated SCI atoms do not contend and cannot cause `f` to be retried.
(var-value handle fallback)Primary contexts retain their direct Var realization. Descendants resolve the stable Var handle through its dense lineage slot.
Primary contexts retain their direct Var realization. Descendants resolve the stable Var handle through its dense lineage slot.
(var-value-at slot fallback)Read a Var through a slot already resolved by the analyzer.
Read a Var through a slot already resolved by the analyzer.
(with-active-world ctx f)Run f with the context's world installed. On the JVM evaluations take a
shared gate permit; a fork takes the exclusive permit and therefore observes
a quiescent source world without adding locks to individual reads.
Run `f` with the context's world installed. On the JVM evaluations take a shared gate permit; a fork takes the exclusive permit and therefore observes a quiescent source world without adding locks to individual reads.
(world-cache-owners)(world-cache-owners world)An eager strong snapshot of currently live cache owners in a lineage. Inspection also removes dead weak entries. Closed worlds retain their registry until cleanup succeeds, so retirement may call this function.
An eager strong snapshot of currently live cache owners in a lineage. Inspection also removes dead weak entries. Closed worlds retain their registry until cleanup succeeds, so retirement may call this function.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |