You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 guard call_thread_unsafe_c_api, but that seems a lot more complicated than using StaticMutex. Am I simply missing the obvious solution here?
Thank you very much for working to rationalize sync!
Thank you! I've switched from StaticMutex to StaticNativeMutex, because StaticMutex seems to have gone missing.
It's nice to have a static mutex type of some sort for protecting external
C APIs.
Le Fri Nov 28 2014 at 11:53:05, Steven Fackler [email protected] a
écrit :
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: