feat: switch away from parking_lot::Mutex

Switching away from `parking_lot::Mutex` as `std::sync::Mutex` performs
better in all scenarios on both of our targets (linux/windows).
This commit is contained in:
zack 2025-03-30 16:27:35 -04:00
parent 234e2ab78d
commit f71f0d8e10
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
10 changed files with 66 additions and 38 deletions

View file

@ -56,9 +56,19 @@ pub enum GfxHalError {
#[error("Error loading the ash entry.")]
AshEntryError(#[from] ash::LoadingError),
/// Poisoned Mutex
#[error("Error from poisoned mutex: {0}")]
MutexPoisoned(String),
/// Placeholder for other specific errors.
#[error("An unexpected error occurred: {0}")]
Other(String),
}
pub type Result<T, E = GfxHalError> = std::result::Result<T, E>;
impl<T> From<std::sync::PoisonError<T>> for GfxHalError {
fn from(e: std::sync::PoisonError<T>) -> Self {
Self::MutexPoisoned(e.to_string())
}
}