Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking Issue for Mutex and RWLock unique accessors #28968
Comments
This comment has been minimized.
This comment has been minimized.
|
cc @aturon |
This comment has been minimized.
This comment has been minimized.
|
Seems like just an oversight to me. |
This comment has been minimized.
This comment has been minimized.
|
This is a dupe of rust-lang/rfcs#1269 (although cross-repo dupes are always interesting). The consensus is basically "this can be added as soon as someone puts in the effort". |
Gankro
added
E-easy
E-mentor
labels
Oct 11, 2015
This comment has been minimized.
This comment has been minimized.
|
Seems like a good noobie task (upon reflection I agree with the rfc issue's assesment that this should return a poison guard). |
This comment has been minimized.
This comment has been minimized.
|
On it! |
cristicbz
referenced this issue
Oct 13, 2015
Merged
Add `into_inner` and `get_mut` to `Mutex` and `RwLock` #29031
bors
added a commit
that referenced
this issue
Oct 15, 2015
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This should probably be renamed into |
Gankro
changed the title
Mutex::into_inner
Tracking Issue for Mutex and RWLock unique accessors
Oct 16, 2015
alexcrichton
added
T-libs
B-unstable
and removed
E-easy
E-mentor
labels
Oct 16, 2015
This comment has been minimized.
This comment has been minimized.
|
Nominating for 1.6 discussion |
alexcrichton
added
the
I-nominated
label
Nov 4, 2015
This comment has been minimized.
This comment has been minimized.
|
|
alexcrichton
added
final-comment-period
and removed
I-nominated
labels
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
|
I'm in favor. Follows existing conventions, fills in a bit of missing expressiveness. |
This comment has been minimized.
This comment has been minimized.
|
Something to consider that I didn't when I submitted the PR is whether we also want Drawbacks: the (crazy idea: it would be really awesome actually, if |
Gankro commentedOct 11, 2015
After #29031, this is now the tracking issue for the stabilization of the following features:
Original report
As far as I can tell, it's sound to straight-up-unwrap a Mutex if you have it by value. This would enable one to do:
Which today requires mutexing an
&mut:Given Arc can be unwrapped, this would also allow the last
Arc<Mutex<T>>in some concurrent context to be fully unwrapped to aT.