mirror of
https://github.com/bertptrs/tracing-mutex.git
synced 2025-12-27 13:30:32 +01:00
Update README
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[](https://github.com/bertptrs/tracing-mutex/actions/workflows/ci.yml)
|
[](https://github.com/bertptrs/tracing-mutex/actions/workflows/ci.yml)
|
||||||
[](https://crates.io/crates/tracing-mutex)
|
[](https://crates.io/crates/tracing-mutex)
|
||||||
[](https://docs.rs/tracing-mutex)
|
[](https://docs.rs/tracing-mutex)
|
||||||
|
|
||||||
Avoid deadlocks in your mutexes by acquiring them in a consistent order, or else.
|
Avoid deadlocks in your mutexes by acquiring them in a consistent order, or else.
|
||||||
|
|
||||||
@@ -18,6 +18,10 @@ should first acquire `Foo` then you can never deadlock. Of course, with just two
|
|||||||
easy to keep track of, but once your code starts to grow you might lose track of all these
|
easy to keep track of, but once your code starts to grow you might lose track of all these
|
||||||
dependencies. That's where this crate comes in.
|
dependencies. That's where this crate comes in.
|
||||||
|
|
||||||
|
This crate tracks the order in which you acquire locks in your code, tries to build a dependency
|
||||||
|
tree out of it, and panics if your dependencies would create a cycle. It provides replacements for
|
||||||
|
existing synchronization primitives with an identical API, and should be a drop-in replacement.
|
||||||
|
|
||||||
Inspired by [this blogpost][whileydave], which references a similar behaviour implemented by
|
Inspired by [this blogpost][whileydave], which references a similar behaviour implemented by
|
||||||
[Abseil][abseil-mutex] for their mutexes.
|
[Abseil][abseil-mutex] for their mutexes.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user