Open antoyo opened 1 year ago
Why?
parking_lot also avoids the poisoning behavior.
Oh, I thought it was used for performance reasons. So, removing it would reduce the build time.
But if it was used to avoid this behavior, then I guess there's no reason to remove it.
parking_lot also avoids the poisoning behavior.
You can get same behaviour by simple wrapper:
struct Mutex<T>(std::sync::Mutex<T>);
impl<T> Mutex<T> {
pub fn lock(&self) -> std::sync::MutexGuard<T> {
self.0.lock().unwrap_or_else(PoisonError::into_inner)
}
}
Hi. Do you think we could remove the dependency to parking_lot now that std's Mutex is faster than before? Regards.