From eb8f5c95771adcc82f1666c709cbe8078c2b3360 Mon Sep 17 00:00:00 2001 From: JieningYu Date: Sun, 25 Aug 2024 15:46:59 +0800 Subject: [PATCH] fix: state and states are thread-safe --- crates/core/state/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/core/state/src/lib.rs b/crates/core/state/src/lib.rs index aa0d915..b0d39c9 100644 --- a/crates/core/state/src/lib.rs +++ b/crates/core/state/src/lib.rs @@ -479,5 +479,11 @@ mod _serde { } } +unsafe impl Send for State<'_, T> {} +unsafe impl Sync for State<'_, T> {} + +unsafe impl Send for States<'_, T> {} +unsafe impl Sync for States<'_, T> {} + #[cfg(test)] mod tests;