mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-01 07:39:40 +00:00
add Sync
constraint for RwLock to prevent memory unsafety (#479)
This commit is contained in:
parent
ab2f64cd84
commit
fb19ebde17
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ pub struct RwLock<T> {
|
|||
}
|
||||
|
||||
unsafe impl<T: Send> Send for RwLock<T> {}
|
||||
unsafe impl<T: Send> Sync for RwLock<T> {}
|
||||
unsafe impl<T: Send + Sync> Sync for RwLock<T> {}
|
||||
|
||||
impl<T> RwLock<T> {
|
||||
/// Creates a new reader-writer lock.
|
||||
|
|
Loading…
Reference in a new issue