Commit Graph

38 Commits

Author SHA1 Message Date
28d67e871c Make elided lifetimes explicit 2025-08-18 12:51:08 +02:00
99bca9852c Opt in to edition 2024 formatting 2025-05-13 15:57:30 +02:00
8ec32bdf16 Reorganise features
Now the features do not directly enable each other, which should silence
extraneous deprecation warnings while running tests. This can be cleaned
up in the next BC break when the old features are removed.
2025-04-10 20:58:45 +02:00
ccc4c98791 Rename dependencies to their crate names
Keep the old names but deprecate them so we can remove them in 0.4.
2025-04-10 20:58:45 +02:00
af366ca3af Document new functionality 2025-03-10 19:32:24 +01:00
d1a6b93ea8 Add new reset_dependencies API 2025-03-01 13:25:20 +01:00
25ae542ade Add support for LazyLock 2025-01-18 11:59:18 +01:00
40f835afd2 Fix clippy issues 2025-01-18 11:57:47 +01:00
c9083c8bc1 Clarify feature selection 2023-09-09 12:02:52 +02:00
a8e8af6351 Make dependency tracking a compile time setting 2023-09-09 11:21:22 +02:00
068303d81d Show cycle backtraces when they happen 2023-09-09 11:21:22 +02:00
6be3e05cab Capture backtraces of allocations for debugging
Largely based on https://github.com/bertptrs/tracing-mutex/pull/28 with
only minor modifications.
2023-08-27 16:44:02 +02:00
29c9daf53e Replace dependency on lazy-static with OnceLock 2023-08-25 08:44:45 +02:00
2d2e03eede Simplify lazy mutex ID drop 2022-08-29 08:26:12 +02:00
6e5516eaa7 Restructure std::sync wrappers 2022-08-27 10:01:51 +02:00
33cb6014a3 Ensure BorrowedMutex is !Send 2022-06-23 21:54:25 +02:00
d1417e0b0c Tag module docs with their required features 2022-05-07 17:52:32 +02:00
Benjamin Lerman
b5a5ca16c3 Do not allow recursive locks. 2022-05-02 08:11:37 +02:00
73b4c8b1af Minimal parking_lot support 2021-05-27 21:16:24 +02:00
6a3cb83d01 Implement Mutex behaviour for lock_api 2021-05-27 21:16:24 +02:00
e2db0eaca8 Fix a graph invariant violation on cycle detection 2021-05-27 20:31:00 +02:00
ebb8132cf8 Add a fuzz-test for the mutex ID's graph 2021-05-24 15:10:41 +02:00
50e99fd07a Rework dependency-tracking to be poison-free
Now new dependency edges that introduce cycles are simply rejected, not
affecting the overall graph. This simplifies the visible API and also
removes the need to restore the graph.
2021-05-16 14:16:51 +02:00
440693ab1e Fix unfortunate typo 2021-05-13 17:44:45 +02:00
75df988d8a Document safety of unsafe Sync impl 2021-05-13 17:08:57 +02:00
dc299f2f9a Reimplement LazyMutexId using MaybeUninit
This shrinks the type by quite a bit and we don't lose state tracking as
the interal std::sync::Once already keeps track of that.

Also add a test for the new behaviour as this is a lot of unsafe code.
2021-05-13 16:55:41 +02:00
19973b3919 Implement a tracing wrapper for std::sync::Once. 2021-05-13 15:24:41 +02:00
eb7abc70ea Derive Default more rather than implement it 2021-05-08 14:28:51 +02:00
050ee27af6 Refactor MutexID to be self tracking
This avoids the need to implement Drop on every wrapped mutex, and
removes the need for unsafe code in this crate.
2021-05-02 11:55:04 +02:00
24c8453496 Document API and design 2021-04-21 20:21:46 +02:00
c196589cfd Implement fast dynamic topsort algorithm 2021-03-27 17:20:37 +01:00
5638ebffd8 Simplify lock guard tracking
Instead of implementing the tracking everywhere, create a RAII-guard
that will track the state as it is held and dropped.
2021-03-20 20:43:05 +01:00
9b56deac26 Simplify code structure 2021-03-19 21:28:14 +01:00
5f2e0e99a8 Use dedicated type for Mutex IDs
This should prevent tiny mistakes in handling the value.
2021-03-19 21:18:50 +01:00
0b6f8816f8 Split mutex-specific code to separate module. 2021-02-21 17:10:49 +01:00
6153af6426 Start tracking lock dependencies 2021-02-21 16:45:21 +01:00
df198ded5d Implement Mutex wrappers 2021-02-13 22:38:17 +01:00
a3a8749f54 Implement very simple digraph with cycle detection 2021-02-13 20:48:34 +01:00