I'm not clear on why https://github.com/rust-lang/rust/blob/master/src/libstd/sys/unix/mutex.rs is
Send. My understanding is that an ownership transfer to a different thread involves a move and pthread mutexes cannot be moved.
It moves the pointer to the mutex, not the mutex itself.
Not in the unix implementation? It's just an
UnsafeCell wrapping a
pthread_mutex_t which is typically just a struct.
::std::sync::Mutex to be sync and send since it's in a
Box, but the internal implementation isn't.
Send but not movable... it's a bit weird, but e.g.
&mut Mutex is fine to
making it non-
Send wouldnt help with the issues around moving it
but anyway all that will be moot once https://github.com/rust-lang/rust/pull/56410 lands
Ooo yup hadn't seen that PR