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
Rust standard libray's version of Mutex has a useful feature of mutex poisoning. If a mutex owning thread panics, then the mutex is marked as poisoned so that other threads could balk and prepare for app shutdown.
Is there value to provide a parking_lot styled mutex implementation that also have this poisoning feature?
The text was updated successfully, but these errors were encountered:
I strongly believe that mutex poisoning is an anti-feature: it hurts usability and reliability. The only reason is it kept in the standard library is because this feature is already stable and cannot be removed.
I'm in favor of mutex poisoning. When one thread has panicked, you don't want other threads advancing into crashed state while you're trying to shut everything down cleanly. Use case: GUI-type programs, where you may want to give the user a message on screen, save some state, and send in a crash report before exiting.
Rust standard libray's version of Mutex has a useful feature of mutex poisoning. If a mutex owning thread panics, then the mutex is marked as poisoned so that other threads could balk and prepare for app shutdown.
Is there value to provide a parking_lot styled mutex implementation that also have this poisoning feature?
The text was updated successfully, but these errors were encountered: