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
A library that provides both sync and unsync versions of common synchronization primitives.
4
11
5
12
## Features
@@ -8,11 +15,33 @@ All of the following primitives are provided in both sync and unsync versions:
8
15
9
16
- Shared (`Rc`/`Arc`)
10
17
- Atomic Scalars
11
-
- Watch
18
+
- Watch
12
19
- Waker Slot (`AtomicWaker` and its unsync counterpart)
13
20
- Mutex
14
21
- Async Mutex
15
22
- BiLock
16
23
- Flag (specialized `AtomicBool`)
17
24
- Event (`event-listener` and `local-event`)
18
25
- Async Flag
26
+
27
+
## Loom Testing Support
28
+
29
+
This library includes built-in support for [loom](https://github.com/tokio-rs/loom), a testing tool for concurrent Rust code that helps verify the correctness of concurrent algorithms.
30
+
31
+
When compiled with `--cfg loom`, the library automatically switches to use loom's implementations of synchronization primitives instead of the standard library versions. This enables you to:
32
+
33
+
- Detect data races and concurrency bugs
34
+
- Verify lock-free algorithms
35
+
- Test different thread interleavings exhaustively
36
+
37
+
For more information about loom and how to write loom tests, see the [loom documentation](https://docs.rs/loom).
38
+
39
+
### Supported Types
40
+
41
+
The following types automatically use loom implementations when the `loom` cfg is enabled:
0 commit comments