ParallelGuard in rustc_data_structures::sync::parallel - Rust (original) (raw)

Struct ParallelGuard

Source

pub struct ParallelGuard {
    panic: Mutex<Option<IntoDynSyncSend<Box<dyn Any + Send + 'static>>>>,
}

Expand description

A guard used to hold panics that occur during a parallel section to later by unwound. This is used for the parallel compiler to prevent fatal errors from non-deterministically hiding errors by ensuring that everything in the section has completed executing before continuing with unwinding. It’s also used for the non-parallel code to ensure error message output match the parallel compiler for testing purposes.

§

§

§

§

§

§

§

§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 24 bytes