quickpool  0.2.0
An easy-to-use, header-only work stealing thread pool in C++11
Classes | Functions
quickpool Namespace Reference

quickpool namespace More...

Classes

class  ThreadPool
 A work stealing thread pool. More...
 
class  TodoList
 Todo list - a synchronization primitive. More...
 

Functions

template<class Function , class... Args>
void push (Function &&f, Args &&... args)
 Direct access to the global thread pool ----------------—. More...
 
template<class Function , class... Args>
auto async (Function &&f, Args &&... args) -> std::future< decltype(f(args...))>
 executes a job asynchronously the global thread pool. More...
 
void wait ()
 waits for all jobs currently running on the global thread pool.
 

Detailed Description

quickpool namespace

Function Documentation

◆ async()

template<class Function , class... Args>
auto quickpool::async ( Function &&  f,
Args &&...  args 
) -> std::future<decltype(f(args...))>

executes a job asynchronously the global thread pool.

Parameters
fa function.
args(optional) arguments passed to f.
Returns
A std::future for the task. Call future.get() to retrieve the results at a later point in time (blocking).

Definition at line 450 of file quickpool.hpp.

◆ push()

template<class Function , class... Args>
void quickpool::push ( Function &&  f,
Args &&...  args 
)

Direct access to the global thread pool ----------------—.

push a job to the global thread pool.

Parameters
fa function.
args(optional) arguments passed to f.

Definition at line 437 of file quickpool.hpp.