Expand description
Lock helpers shared by lanes and backends.
Replace .lock().unwrap() and .read()/.write().unwrap() in hot paths
with mutex_lock / read_lock / write_lock so a poisoned
lock yields a LaneError::LockPoisoned (or a RenderError) instead
of crashing the frame.
These helpers live in khora-core so both khora-lanes and
khora-infra can use them without crossing crate boundaries.
Functionsยง
- mutex_
lock - Locks a
Mutex<T>, mapping poisoning toLaneError::LockPoisoned. - mutex_
lock_ render - Locks a
Mutex<T>, mapping poisoning to aRenderError. - read_
lock - Acquires a read lock, mapping poisoning to
LaneError::LockPoisoned. - read_
lock_ render - Like
mutex_lock_renderbut forRwLock<T>read access. - write_
lock - Acquires a write lock, mapping poisoning to
LaneError::LockPoisoned. - write_
lock_ render - Like
mutex_lock_renderbut forRwLock<T>write access.