Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Java/Threema/domain/libthreema/lib/src/utils/     Datei vom 25.3.2026 mit Größe 620 B image not shown  

Quelle  sync.rs

  Sprache: Rust
 

//! Sync-related utilities.
use std::sync::{Mutex, MutexGuard, PoisonError};

/// Extension for [`Mutex`] to ignore and disregard any poison introduced by a thread panicking
/// while holding the lock.
pub(cratetrait MutexIgnorePoison {
    type T;

    /// Acquires a mutex, blocking the current thread until it is able to do so, ignoring any mutex
    /// poison.
    fn lock_ignore_poison(&self) -> MutexGuard<'_, Self::T>;
}

impl<T> MutexIgnorePoison for Mutex<T> {
    type T = T;

    fn lock_ignore_poison(&self) -> MutexGuard<'_, Self::T> {
        self.lock().unwrap_or_else(PoisonError::into_inner)
    }
}

Messung V0.5 in Prozent
C=95 H=92 G=93

¤ Dauer der Verarbeitung: 0.8 Sekunden  (vorverarbeitet am  2026-06-22) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.