pub struct CoreState { /* private fields */ }Expand description
Per-shard mutable Core state (Step 2a, D220-EXEC: still exactly ONE
shard — behaviour-identical with the pre-B-2 single CoreState;
Step 2b keys a per-[crate::state_cell::ShardKey] map of these).
All mutable Core state, behind one parking_lot::Mutex.
Architecture history. Q2 (2026-05-09) split four wave-scoped
cross-partition aggregation fields out into a separate
parking_lot::Mutex<CrossPartitionState> on Core. Q-beyond
Sub-slice 1 (D108, 2026-05-09) eliminated CrossPartitionState
entirely — its four fields moved to per-thread WaveState
thread_local in crate::batch. Sub-slice 2 + 3 moved 8 more
wave-scoped fields the same way. /qa F1+F2 (2026-05-10) reverted
in_tick and currently_firing to CoreState; currently_firing
stays here (cross-thread P13 set_deps check, /qa F2), but in_tick
was re-keyed per-(Core, thread) into the
crate::batch::IN_TICK_OWNED thread_local (D047, 2026-05-15) and
then collapsed to a one-Core-per-OS-thread Cell<u64> slot
(D252, S5, 2026-05-19) — the actor-model invariant locks
“one Core per OS thread” so a single-generation slot suffices,
with cross-Core same-thread nesting panicking fail-loud at
BatchGuard::claim_in_tick. See docs/rust-port-decisions.md.
The D1 patch (2026-05-09) moved Slice G’s tier3_emitted_this_wave
set to a per-thread thread-local in crate::batch (was briefly
per-partition under Q3 v1; that placement was vulnerable to mid-wave
cross-thread set_deps partition splits — see
docs/porting-deferred.md “Per-partition state-shard refactor”
closing summary). Q-beyond
will continue the shape decomposition by sharding most of the
remaining fields per-partition.
Trait Implementations§
Source§impl Drop for CoreState
Release every binding-side refcount share owned by this CoreState
when the last Core clone drops the inner Mutex.
impl Drop for CoreState
Release every binding-side refcount share owned by this CoreState
when the last Core clone drops the inner Mutex.
Without this, every retained handle in cache / terminal Error /
dep_terminals Error / pause-buffer-payload would leak in the binding
registry until process exit. Production bindings (napi-rs, pyo3,
wasm-bindgen) all maintain handle-ref maps that grow unbounded without
this cleanup.
Safe to call during panic unwinding — BindingBoundary::release_handle
is the only call, and a panicking binding during cleanup would already
have been a problem in normal operation.