Skip to main content

Module sync

Module sync 

Source
Expand description

Synchronization utilities for safe lock acquisition.

This module provides helper functions that handle lock poisoning gracefully, preventing panic cascades when a thread panics while holding a lock.

Structs§

LockPoisonedError
Error returned when a lock is poisoned.

Functions§

acquire_mutex
Acquires a mutex lock, returning an error if the lock is poisoned.
acquire_read
Acquires a read lock, returning an error if the lock is poisoned.
acquire_write
Acquires a write lock, returning an error if the lock is poisoned.