Skip to content

Commit bbd901e

Browse files
committed
fixes
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent 84e1601 commit bbd901e

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

docs/developer-guide/internals/execution.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,9 @@ pub trait ExecuteParentKernel<V: VTable> {
133133
}
134134

135135
pub fn initialize(session: &VortexSession) {
136-
let Some(kernels) = session.kernels() else {
137-
return;
138-
};
139-
kernels.register_execute_parent_kernel(parent_id, Child, Kernel);
136+
session
137+
.kernels()
138+
.register_execute_parent_kernel(parent_id, Child, Kernel);
140139
}
141140
```
142141

docs/developer-guide/internals/session.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ or other shared resources.
1212

1313
The session is built on two primitives from the `vortex-session` crate:
1414

15-
- **`VortexSession`** -- a cloneable, thread-safe map from Rust `TypeId` to a boxed value. Any
16-
type that is `Send + Sync + Debug + 'static` can be stored as a session variable.
15+
- **`VortexSession`** -- a cloneable, thread-safe map from Rust `TypeId` to a shared
16+
(`Arc`-wrapped) value. Any type that is `Clone + Send + Sync + Debug + 'static` can be stored
17+
as a session variable.
1718
- **`Registry<T>`** -- a concurrent map from string IDs to values of type `T`, used by each
1819
component to look up registered plugins at runtime.
1920

20-
Because `VortexSession` is backed by an `Arc<DashMap>`, cloning is cheap and all clones share
21-
the same state. This makes it safe to hand the session to multiple threads, tasks, or I/O
22-
operations without coordination.
21+
Because `VortexSession` is backed by an `ArcSwap`, cloning is cheap and all clones share the
22+
same state, with lock-free reads and copy-on-write writes. This makes it safe to hand the
23+
session to multiple threads, tasks, or I/O operations without coordination.
2324

2425
## Component Registries
2526

0 commit comments

Comments
 (0)