Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
boost::threadpool::detail::worker_thread< Pool > Class Template Reference

Thread pool worker. More...

#include <worker_thread.hpp>

Inheritance diagram for boost::threadpool::detail::worker_thread< Pool >:
Inheritance graph
[legend]

Public Types

typedef Pool pool_type
 Indicates the pool's type. More...
 

Public Member Functions

void join ()
 
void run ()
 

Static Public Member Functions

static void create_and_attach (shared_ptr< pool_type > const &pool)
 

Private Member Functions

void died_unexpectedly ()
 
 worker_thread (shared_ptr< pool_type > const &pool)
 

Private Attributes

shared_ptr< pool_typem_pool
 Pointer to the pool which created the worker. More...
 
shared_ptr< boost::thread > m_thread
 Pointer to the thread which executes the run loop. More...
 

Detailed Description

template<typename Pool>
class boost::threadpool::detail::worker_thread< Pool >

Thread pool worker.

A worker_thread represents a thread of execution. The worker is attached to a thread pool and processes tasks of that pool. The lifetime of the worker and its internal boost::thread is managed automatically.

This class is a helper class and cannot be constructed or accessed directly.

See also
pool_core

Definition at line 44 of file worker_thread.hpp.

Member Typedef Documentation

template<typename Pool>
typedef Pool boost::threadpool::detail::worker_thread< Pool >::pool_type

Indicates the pool's type.

Definition at line 49 of file worker_thread.hpp.

Constructor & Destructor Documentation

template<typename Pool>
boost::threadpool::detail::worker_thread< Pool >::worker_thread ( shared_ptr< pool_type > const &  pool)
inlineprivate

Constructs a new worker.

Parameters
poolPointer to it's parent pool.
See also
function create_and_attach

Definition at line 60 of file worker_thread.hpp.

Member Function Documentation

template<typename Pool>
static void boost::threadpool::detail::worker_thread< Pool >::create_and_attach ( shared_ptr< pool_type > const &  pool)
inlinestatic

Constructs a new worker thread and attaches it to the pool.

Parameters
poolPointer to the pool.

Definition at line 100 of file worker_thread.hpp.

template<typename Pool>
void boost::threadpool::detail::worker_thread< Pool >::died_unexpectedly ( )
inlineprivate

Notifies that an exception occurred in the run loop.

Definition at line 69 of file worker_thread.hpp.

template<typename Pool>
void boost::threadpool::detail::worker_thread< Pool >::join ( )
inline

Joins the worker's thread.

Definition at line 91 of file worker_thread.hpp.

template<typename Pool>
void boost::threadpool::detail::worker_thread< Pool >::run ( )
inline

Executes pool's tasks sequentially.

Definition at line 78 of file worker_thread.hpp.

Member Data Documentation

template<typename Pool>
shared_ptr<pool_type> boost::threadpool::detail::worker_thread< Pool >::m_pool
private

Pointer to the pool which created the worker.

Definition at line 52 of file worker_thread.hpp.

template<typename Pool>
shared_ptr<boost::thread> boost::threadpool::detail::worker_thread< Pool >::m_thread
private

Pointer to the thread which executes the run loop.

Definition at line 53 of file worker_thread.hpp.


The documentation for this class was generated from the following file:


asr_descriptor_surface_based_recognition
Author(s): Allgeyer Tobias, Hutmacher Robin, Mei├čner Pascal
autogenerated on Mon Dec 16 2019 03:31:16