pub trait Strategizer: Spawner {
// Required method
fn strategy(&self, parallelism: NonZeroUsize) -> Rayon;
}Expand description
Interface that runtimes implement to provide parallel execution strategies.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Strategizer for commonware_runtime::deterministic::Context
Spawning threads would be nondeterministic, so the pool has no background workers. The executor thread registers itself as its sole member and all work executes inline.
Rayon’s current-thread registration is permanent and per-OS-thread, so only one pool can ever execute work on the executor thread. Every request (including from a later runner on the same thread) returns a strategy on that single-threaded pool with its planning parallelism set independently. This controls adaptive decisions and manual partitioning hints while Rayon executes on the sole registered thread. The returned strategy is therefore tied to the executor thread.
impl Strategizer for commonware_runtime::tokio::Context
commonware_stability_DELTA nor commonware_stability_EPSILON nor commonware_stability_GAMMA nor commonware_stability_RESERVED.