Module poison

Synchronization objects that employ poisoning.

Poisoning

All synchronization objects in this module implement a strategy called "poisoning" where a primitive becomes poisoned if it recognizes that some thread has panicked while holding the exclusive access granted by the primitive. This information is then propagated to all other threads to signify that the data protected by this primitive is likely tainted (some invariant is not being upheld).

The specifics of how this "poisoned" state affects other threads and whether the panics are recognized reliably or on a best-effort basis depend on the primitive. See Overview below.

The synchronization objects in this module have alternative implementations that do not employ poisoning in the std::sync::nonpoison module.

Overview

Below is a list of synchronization objects provided by this module with a high-level overview for each object and a description of how it employs "poisoning".

Note that the Once type also employs poisoning, but since it has non-poisoning force methods available on it, there is no separate nonpoison and poison version.

Structs

Enums

Type Aliases