Skip to main content

mutex_lock_render

Function mutex_lock_render 

Source
pub fn mutex_lock_render<'a, T: ?Sized>(
    lock: &'a Mutex<T>,
    context: &'static str,
) -> Result<MutexGuard<'a, T>, RenderError>
Expand description

Locks a Mutex<T>, mapping poisoning to a RenderError.

Use from GPU-init / GPU-shutdown paths that return Result<_, RenderError> (the GPU error type) — the LaneError-returning mutex_lock does not compose with ? there.