mind: static assert Mind is Send + Sync

Mind is already Send + Sync — all fields use Arc or sync primitives.
Add compile-time assertion so it stays that way.

Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2026-04-05 04:34:30 -04:00
parent d5a706147a
commit 8e3137fe3f

View file

@ -180,6 +180,12 @@ pub struct Mind {
_supervisor: crate::thalamus::supervisor::Supervisor,
}
const _: () = {
fn _assert_send<T: Send>() {}
fn _assert_sync<T: Sync>() {}
fn _check() { _assert_send::<Mind>(); _assert_sync::<Mind>(); }
};
impl Mind {
pub fn new(
config: SessionConfig,