-
Notifications
You must be signed in to change notification settings - Fork 13.4k
sync::mutex::StaticMutex disappeared from public API, perhaps unintentionally? #19379
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
It looks like this library feature is trying to disappear out from under us: rust-lang/rust#19379 This will patch things up for now.
It lives in librustrt right now, though I believe that crate will be subsumed into libstd as well soon: http://doc.rust-lang.org/rustrt/mutex/ |
Thank you! I've switched from It's nice to have a static mutex type of some sort for protecting external
|
|
chore: Bump `Edition::CURRENT` to 2024
This seems to have been removed here, as part of the sync cleanup for #19274: 689ef2d
The commit message says:
My use-case for
StaticMutex
was protecting global state in C libraries in emk/rust-cld2 using code like:Is there a clean way to do this with guards, etc.? I suppose I could use
Once
to bootstrap my way up to a global mutex, and use that to guardcall_thread_unsafe_c_api
, but that seems a lot more complicated than usingStaticMutex
. Am I simply missing the obvious solution here?Thank you very much for working to rationalize
sync
!cc @bors @alexcrichton
The text was updated successfully, but these errors were encountered: