Struct panic_monitor::PanicMonitor [] [src]

pub struct PanicMonitor { /* fields omitted */ }

A list of all threads which have panicked, with the ability to notify interested parties when this list is updated.

Methods

impl PanicMonitor
[src]

[src]

Create a new PanicMonitor.

Call this inside a lazy_static block. You must call init after this.

[src]

Initialise the PanicMonitor.

Call this method as early as you can: a thread which panics before the PanicMonitor is initialised will not trigger wake-ups. Calling init multiple times is relatively harmless.

[src]

Block the current thread until one of the watched threads panics. The returned vector is always non-empty.

Note that this function returns as soon as one or more of the threads on the watch list has panicked. This means that if you specify a thread which has already panicked, this function will return immediately. Think of it as level-triggered, not edge-triggered.

[src]

Block the current thread until one of the watched threads panic, or the timeout expires. The returned vector is empty if and only if the timeout expired.

See wait for more information.

[src]

Check if any of the specified threads have panicked. This function may block, but only very briefly. The returned vector may be empty.

See wait for more information.

Trait Implementations

Auto Trait Implementations

impl Send for PanicMonitor

impl Sync for PanicMonitor