Skip to main content

Module sync_utils

Module sync_utils 

Source
Expand description

Synchronization utilities with poison recovery

This module provides helper functions for acquiring locks on Mutex and RwLock that automatically recover from poisoned state. Poison recovery allows the application to continue operating even if a thread panicked while holding a lock.

Functionsยง

mutex_lock_or_recover
Recover from a poisoned Mutex
rwlock_read_or_recover
Recover from a poisoned RwLock read guard
rwlock_write_or_recover
Recover from a poisoned RwLock write guard