Struct task_queue::spawn_policy::DynamicSpawnPolicy [] [src]

pub struct DynamicSpawnPolicy { /* fields omitted */ }

Policy that provide dynamic 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::DynamicSpawnPolicy::new());
queue.set_spawn_policy(boxed_policy);

Methods

impl DynamicSpawnPolicy
[src]

Create policy that provide dynamic number of threads for queue. Policy will trying to change number of threads every 5 minutes.

Create policy that provide dynamic number of threads for queue. Policy will trying to change number of threads no more often delta.

Trait Implementations

impl SpawnPolicy for DynamicSpawnPolicy
[src]

Returns current number of threads.