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:
parent
234e2ab78d
commit
f71f0d8e10
10 changed files with 66 additions and 38 deletions
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue