[][src]Struct loom::model::Builder

pub struct Builder {
    pub max_threads: usize,
    pub max_branches: usize,
    pub max_permutations: Option<usize>,
    pub max_duration: Option<Duration>,
    pub preemption_bound: Option<usize>,
    pub checkpoint_file: Option<PathBuf>,
    pub checkpoint_interval: usize,
    pub log: bool,
    // some fields omitted
}

Configure a model

Fields

max_threads: usize

Max number of threads to check as part of the execution. This should be set as low as possible.

max_branches: usize

Maximum number of thread switches per permutation.

max_permutations: Option<usize>

Maximum number of permutations to explore.

max_duration: Option<Duration>

Maximum amount of time to spend on checking

preemption_bound: Option<usize>

Maximum number of thread preemptions to explore

checkpoint_file: Option<PathBuf>

When doing an exhaustive check, uses the file to store and load the check progress

checkpoint_interval: usize

How often to write the checkpoint file

log: bool

Log execution output to stdout.

Methods

impl Builder[src]

pub fn new() -> Builder[src]

Create a new Builder instance with default values.

pub fn checkpoint_file(&mut self, file: &str) -> &mut Self[src]

Set the checkpoint file.

pub fn check<F>(&self, f: F) where
    F: Fn() + Sync + Send + 'static, 
[src]

CHeck a model

Trait Implementations

impl Debug for Builder[src]

Auto Trait Implementations

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

impl RefUnwindSafe for Builder

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]