]> git.lizzy.rs Git - rust.git/commit
Remove unneeded `Send`/`Sync` bounds from `Mutex`/`RwLock`.
authorHuon Wilson <dbau.pp+github@gmail.com>
Sun, 8 Mar 2015 11:01:01 +0000 (22:01 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Sun, 8 Mar 2015 11:01:01 +0000 (22:01 +1100)
commit25d070f228a101a806165a434b150a59a54f08ba
tree3f6b4510213965d22c41f8787ff74dbbbfebdf08
parent35275076f52d53c3dcd9dee85d92a2059a663225
Remove unneeded `Send`/`Sync` bounds from `Mutex`/`RwLock`.

The requirements `T: Send` and `T: Send + Sync` for `Mutex` and `RwLock`
respectively only matter if those types are shared/sent across thread
boundaries, and that is adequately controlled by the impls of
`Send`/`Sync` for them. If `T` doesn't satisfy the bounds, then
the types cannot cross thread boundaries and so everything is still
safe (the two types just act like an expensive `RefCell`).
src/libstd/sync/mutex.rs
src/libstd/sync/rwlock.rs