Struct task_queue::spawn_policy::StaticSpawnPolicy
[−]
[src]
pub struct StaticSpawnPolicy;
Policy that provide max number of threads for queue.
Examples
extern crate task_queue; let mut queue = task_queue::TaskQueue::new(); let boxed_policy = Box::new(task_queue::spawn_policy::StaticSpawnPolicy::new()); queue.set_spawn_policy(boxed_policy);
Methods
impl StaticSpawnPolicy
[src]
fn new() -> Self
Create policy that provide max number of threads for queue.
Trait Implementations
impl SpawnPolicy for StaticSpawnPolicy
[src]
fn get_count(&mut self, stats: TaskQueueStats) -> usize
Returns current number of threads.