You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if this crate could support parking_lot::Condvar similar to std::sync::Condvar is supported. Unfortunately, the approach taken for std doesn't work.
For std, we unwrap the passed mutex guard and simply pass that to the wrapped Condvar. For parking lot this does not work for two reasons:
The Condvar accepts the guard by mutable reference rather than by value. This prevents destructuring, but that turns out to not be a problem because
It appears "impossible" to get a parking_lot::MutexGuard from a tracing_mutex::parkinglot::TracingMutexGuard. The added indirection of the lock_api primitives and private fields means we cannot just access that.
The word impossible is intentionally in quotes because I'm nowhere near sure that there's actually no way to do it.
The text was updated successfully, but these errors were encountered:
It would be nice if this crate could support
parking_lot::Condvar
similar tostd::sync::Condvar
is supported. Unfortunately, the approach taken forstd
doesn't work.For
std
, we unwrap the passed mutex guard and simply pass that to the wrappedCondvar
. For parking lot this does not work for two reasons:Condvar
accepts the guard by mutable reference rather than by value. This prevents destructuring, but that turns out to not be a problem becauseparking_lot::MutexGuard
from atracing_mutex::parkinglot::TracingMutexGuard
. The added indirection of thelock_api
primitives and private fields means we cannot just access that.The word impossible is intentionally in quotes because I'm nowhere near sure that there's actually no way to do it.
The text was updated successfully, but these errors were encountered: