Crate taskqueue [−] [src]

TaskQueue

Multi-threading for Rust made easy based on mioco

TaskQueue is a libdispatch inspired threading library.

Instead of manually managing threads, your create Queues with handle a set of tasks each with their own invariants and guarantees regarding those tasks. The Queues themselves are very lightweight and run on a shared global thread pool, that is completely managed in the background by the libary, allowing you to abstract easily and focus on your particular problem.

TaskQueue provides you with two types of queues:

  1. SerialQueues - executing tasks serialily non-overlapping in order of queuing
  2. ConcurrentQueues - executing tasks parallely on any thread as soon as possible

and an IO module derived from mioco that lets you use non-blocking IO (which is required in queues) in a blocking fashion.

Reexports

pub use self::extensions::iterator::*;

Modules

extensions

Helpers for existing std traits utilizing TaskQueue

io

IO module providing a queue-compatible mostly std-like replacement for native blocking IO. Provided through mioco and mio. Other types implementing mio's Evented Trait might be used aswell through io::mio::MioAdapter.

Structs

BoundSerialQueue

A bound SerialQueue holding a queue-bound variable

ConcurrentQueue

Queue executing tasks in parallel

Future

Future holding the variable of a maybe to be executed task

FutureGuard

Future holding the variable of a maybe to be executed task. Guards the Task and waits for it on Drop.

Group

Group provides a way to synchronize multiple Tasks

SerialQueue

Queue executing Tasks serially, non-overlapping in queued Order

Enums

LoopResult

Helper struct for Queue::loop_while

Traits

Queue

Basic Queue Trait defining all possible operations on Queues

Functions

init_main

Convert the main thread into a SerialQueue