Skip to content

Commit

Permalink
fix: state and states are thread-safe
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Aug 25, 2024
1 parent dff560e commit eb8f5c9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/core/state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,5 +479,11 @@ mod _serde {
}
}

unsafe impl<T: Send> Send for State<'_, T> {}
unsafe impl<T: Sync> Sync for State<'_, T> {}

unsafe impl<T: Send> Send for States<'_, T> {}
unsafe impl<T: Sync> Sync for States<'_, T> {}

#[cfg(test)]
mod tests;

0 comments on commit eb8f5c9

Please sign in to comment.