Liking cljdoc? Tell your friends :D

sci.impl.world

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.
raw docstring

absentclj/s

source

active-ctxclj/s

(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.
sourceraw docstring

active-world-stateclj/s

(active-world-state)
source

alter-namespace-meta!clj/s

(alter-namespace-meta! handle fallback f args)
source

alter-type-data!clj/s

(alter-type-data! handle fallback f args)
source

alter-var-meta!clj/s

(alter-var-meta! handle fallback f args)
source

alter-var-watches!clj/s

(alter-var-watches! handle fallback f args)
source

attach-managed-owner!clj/s

(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.
sourceraw docstring

binding-scopeclj/s

(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.
sourceraw docstring

call-with-contextclj/s

(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.
sourceraw docstring

call-with-var-contextclj/s

(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.
sourceraw docstring

compare-and-set-tracked!clj/s

(compare-and-set-tracked! handle expected new validate! notify!)
source

current-worldclj/s

(current-world)
source

fork-worldclj/s

(fork-world world fork-value snapshot-value snapshot-var-meta)
source

IWorldTrackedclj/sprotocol

-mark-world-tracked!clj/s

(-mark-world-tracked! handle home-ctx)

-world-home-ctxclj/s

(-world-home-ctx handle)

-world-tracked?clj/s

(-world-tracked? handle)
source

managed-assoc!clj/s

(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.
sourceraw docstring

managed-compare-and-set!clj/s

(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?)
source

managed-reset!clj/s

(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?)
source

managed-swap!clj/s

(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.
sourceraw docstring

managed-update-control-with-value!clj/s

(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.
sourceraw docstring

managed-valueclj/s

(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.
sourceraw docstring

managed-value-inclj/s

(managed-value-in world home slot)

Read a managed slot from an already selected world.

Read a managed slot from an already selected world.
sourceraw docstring

mutable-primary-world?clj/s

(mutable-primary-world?)
source

namespace-metaclj/s

(namespace-meta handle fallback)
source

new-worldclj/s

(new-world)
source

primary-world?clj/s

(primary-world?)
source

read-worldclj/s

(read-world world primary?)
source

register!clj/s

(register! handle value)
(register! handle value value-fork-fn)
source

register-managed!clj/s

(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.
sourceraw docstring

register-namespace!clj/s

(register-namespace! handle m)
source

register-type!clj/s

(register-type! handle data)
(register-type! handle data value-fork-fn)
source

register-var!clj/s

(register-var! handle value m)
(register-var! handle value m watches)
source

registered?clj/s

(registered? world handle)
source

reset-namespace-meta!clj/s

(reset-namespace-meta! handle m)
source

reset-tracked!clj/s

(reset-tracked! handle new validate! notify!)
source

reset-type-data!clj/s

(reset-type-data! handle data)
source

reset-value!clj/s

(reset-value! handle value)
source

reset-var-meta!clj/s

(reset-var-meta! handle m)
source

slot-ofclj/s

(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.
sourceraw docstring

swap-value!clj/s

(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.
sourceraw docstring

tracked?clj/s

(tracked? handle)
source

type-dataclj/s

(type-data handle fallback)
source

valueclj/s

(value handle fallback)
source

var-metaclj/s

(var-meta handle fallback)
source

var-valueclj/s

(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.
sourceraw docstring

var-value-atclj/s

(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.
sourceraw docstring

var-watchesclj/s

(var-watches handle fallback)
source

with-active-worldclj/s

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close