bertptrs / tracing-mutex

A Mutex wrapper tracking acquisition order
https://docs.rs/tracing-mutex/
Apache License 2.0
66 stars 7 forks source link

Is there a way to print/include the offending ordering? #29

Closed jhfrontz closed 1 year ago

jhfrontz commented 1 year ago

I get a panic when the out-of-order resource is acquired, but I'm not sure what it's conflicting with.

(I can't tell if https://github.com/bertptrs/tracing-mutex/pull/28 will do this or not)

bertptrs commented 1 year ago

Hey, thanks for the interest. I think #28 might do this. It adds a bit of overhead but I think it's worth it.

We can already print the IDs of the mutexes in the offending cycle but that isn't really helpful because it won't relate to the actual places in the code as easily.

The original author of the PR might not be interested anymore, but I hope to implement something similar and add it to the 0.3 release.

bertptrs commented 1 year ago

Update: feature has been merged, but the release is a big one so I'll need to do some more work to clean it up.

bertptrs commented 1 year ago

Fixed with the release of v0.3.0. Note that this release does contain some breaking changes, so please do take note of the changelog.