fw4spl
|
This namespace fwThread provides few tools to execute asynchronous tasks on different threads. More...
Classes | |
class | Pool |
This class creates and manages a pool of threads which process tasks. More... | |
struct | TaskHandler |
This class encapsulates packaged task and provides a copy constructor. More... | |
class | Timer |
The Timer class provides single-shot or repetitive timers. A Timer triggers a function once after a delay, or periodically, inside the worker loop. The delay or the period is defined by the duration attribute. More... | |
class | TimerAsio |
Private Timer implementation using boost::asio. More... | |
class | Worker |
This class creates and manages a task loop. The default implementation create a loop in a new thread. More... | |
class | WorkerAsio |
Private implementation of fwThread::Worker using boost::asio. More... | |
Typedefs | |
typedef std::thread::id | ThreadIdType |
Functions | |
FWTHREAD_API Pool & | getDefaultPool () |
Get the default pool. | |
template<typename R > | |
std::function< void() > | moveTaskIntoFunction (std::packaged_task< R > &task) |
Encapsulate a packaged_task into a boost function to be easily posted on a worker. | |
FWTHREAD_API ThreadIdType | getCurrentThreadId () |
Returns the current thread id. | |
std::size_t | WorkerThread (::boost::asio::io_service &io_service) |
This namespace fwThread provides few tools to execute asynchronous tasks on different threads.