pub type ParallelCallback<'a> = Box<dyn FnMut(HashMap<VarName, Constant>) -> bool + Send + 'a>;Expand description
Callback type for parallel portfolio search.
The closure must be Send + Sync because it may be invoked from any of
the worker threads. The C-side controller serialises invocations with a
mutex (so two workers never call this concurrently) but Rust still needs
the bound for soundness when we cross the FFI boundary from multiple
threads.
Aliased Type§
pub struct ParallelCallback<'a>(/* private fields */);Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 16 bytes