Skip to main content

SharedIndex

Type Alias SharedIndex 

Source
pub type SharedIndex = Arc<Mutex<Option<IndexState>>>;
Expand description

Shared, mutable cell carrying the (at most one) live workspace index. Mutex rather than RwLock because rebuilds flip the slot wholesale and every mutating op (record_edit, agent_register, lock_try, etc.) needs exclusive access. Single-threaded VM scripts pay no real cost from the choice; embedders that fan out across threads are still safe because the mutex serialises everyone.

Aliased Typeยง

pub struct SharedIndex { /* private fields */ }