loomy 0.1.1

A shim to easily run loom tests
Documentation
  • Coverage
  • 25%
    1 out of 4 items documented1 out of 1 items with examples
  • Size
  • Source code size: 6.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 9.18 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • overdrivenpotato/loomy
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • overdrivenpotato

loomy

Crates.io [Documentation][docs]

A shim crate to easily test code with loom.

// std or loom, chosen at compile time by crate feature.
use loomy::{thread, cell::UnsafeCell};

struct Foo {
    cell: UnsafeCell<...>,
}

#[test]
fn test_example() {
    // When using `std`, `loomy::model` only invokes the closure and nothing
    // more.
    loomy::model(|| {
        // ...
        thread::spawn(|| {
            // ...
        });
        // ...
    });
}

Run tests with std:

$ cargo test

Run tests with loom:

$ cargo test --features loomy/enable