From 111a6a8ed1cbb840f984fc6f28e76e897bb2b63e Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Fri, 3 Jan 2025 03:52:48 -0500 Subject: [PATCH] Small Fix to Mutex Init (#6846) --- wgpu-hal/src/auxil/dxgi/exception.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wgpu-hal/src/auxil/dxgi/exception.rs b/wgpu-hal/src/auxil/dxgi/exception.rs index c3d655c6e5..15311e3953 100644 --- a/wgpu-hal/src/auxil/dxgi/exception.rs +++ b/wgpu-hal/src/auxil/dxgi/exception.rs @@ -1,6 +1,6 @@ use std::{borrow::Cow, slice}; -use parking_lot::{lock_api::RawMutex, Mutex}; +use parking_lot::Mutex; use windows::Win32::{Foundation, System::Diagnostics::Debug}; // This is a mutex as opposed to an atomic as we need to completely @@ -9,7 +9,7 @@ use windows::Win32::{Foundation, System::Diagnostics::Debug}; // // By routing all the registration through these functions we can guarantee // there is either 1 or 0 exception handlers registered, not multiple. -static EXCEPTION_HANDLER_COUNT: Mutex = Mutex::const_new(parking_lot::RawMutex::INIT, 0); +static EXCEPTION_HANDLER_COUNT: Mutex = Mutex::new(0); pub fn register_exception_handler() { let mut count_guard = EXCEPTION_HANDLER_COUNT.lock();