bench.rs |
|
831 |
bench_acquire.rs |
Benchmark the overhead that the synchronization of `OnceCell::get` causes.
We do some other operations that write to memory to get an imprecise but somewhat realistic
measurement. |
1344 |
lazy_static.rs |
|
1036 |
reentrant_init_deadlocks.rs |
|
351 |
regex.rs |
|
1663 |
test_synchronization.rs |
Test if the OnceCell properly synchronizes.
Needs to be run in release mode.
We create a `Vec` with `N_ROUNDS` of `OnceCell`s. All threads will walk the `Vec`, and race to
be the first one to initialize a cell.
Every thread adds the results of the cells it sees to an accumulator, which is compared at the
end.
All threads should end up with the same result. |
1225 |