-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make ReentrantMutex
movable and const
#100576
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
b6004c5
to
8eacc7d
Compare
cc @m-ou-se in case you have opinions, but I don't see anything that particularly needs your insight in this PR. |
8eacc7d
to
a30d3a9
Compare
@rustbot ready |
a30d3a9
to
9d222e9
Compare
@rustbot ready |
@bors r+ rollup=iffy |
…rk-Simulacrum Make `ReentrantMutex` movable and `const` As `MovableMutex` is now `const`, it can be used to simplify the implementation and interface of the internal reentrant mutex type. Consequently, the standard output and error streams do not need to be wrapped in `OnceLock` and `OnceLock::get_or_init_pin()` can be removed. Moving the initialization of the `Stdout` buffer to `StdoutLock` means that there is only one synchronization primitive required, at the cost of probably two instructions for every read/write.
9d222e9
to
8c37fdf
Compare
@rustbot ready |
@bors r+ |
⌛ Testing commit 8c37fdf with merge 09fb0bc6ecef62201d7c662db24b984d03245ac6... |
☀️ Test successful - checks-actions |
👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward |
Finished benchmarking commit (09fb0bc6ecef62201d7c662db24b984d03245ac6): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
@bors r- retry r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (e7cdd4c): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Footnotes |
As
MovableMutex
is nowconst
, it can be used to simplify the implementation and interface of the internal reentrant mutex type. Consequently, the standard error stream does not need to be wrapped inOnceLock
andOnceLock::get_or_init_pin()
can be removed.