Skip to main content

mutex_lock_render

Function mutex_lock_render 

pub fn mutex_lock_render<'a, T>(
    lock: &'a Mutex<T>,
    context: &'static str,
) -> Result<MutexGuard<'a, T>, RenderError>
where T: ?Sized,
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.