Struct tasque::TaskQueueBuilder [] [src]

pub struct TaskQueueBuilder { /* fields omitted */ }

TaskQueue builder.

Examples

use tasque::TaskQueueBuilder;

let queue = TaskQueueBuilder::new().worker_count(4).finish();
queue.enqueue(|| println!("Hello"));
queue.enqueue(|| println!("World"));

Methods

impl TaskQueueBuilder
[src]

[src]

Makes a new TaskQueueBuilder instance.

[src]

Sets the name of this queue.

If it is specified, the metrics of this queue have the label name="${name}".

[src]

Sets the number of worker threads which the queue to be built will spawn.

[src]

Sets the registry of the metrics of this queue.

The default value is prometrics::default_registry().

[src]

Builds a TaskQueue instance.

Trait Implementations

impl Debug for TaskQueueBuilder
[src]

[src]

Formats the value using the given formatter.

impl Default for TaskQueueBuilder
[src]

[src]

Returns the "default value" for a type. Read more