Module yatp::pool[][src]

The pool implement details.

To build your own thread pool while reusing the scheduling design of the crate, you need to implement Runner trait.

Structs

Builder

A builder for the thread pool.

CloneRunnerBuilder

A builder that create new Runner by cloning the old one.

Local

Spawns tasks to the associated thread pool.

Remote

Submits tasks to associated thread pool.

SchedConfig

Configuration for schedule algorithm.

ThreadPool

A generic thread pool.

Traits

Runner

In the model of yatp, any piece of logic aiming to be executed in a thread pool is called Task. There can be different definitions of Task. Some people may choose Future as Task, some may just want callbacks, or even Actor messages. But no matter what a Task is, there should be some role know how to execute it. The role is call Runner.

RunnerBuilder

A builder trait that produce Runner.

Functions

build_spawn

Building remotes and locals from the given queue and configuration.