Thread portable class


Gate portable class


Timer class


Pool class


Terimber 2.0


About C++


Downloads Products & Services Support Clients Open Source About



Home / Open source / Terimber 2.0

terimber_threadpool Class Reference

abstract interface for the thread pool More...

#include <threadpoolfactory.h>

Inheritance diagram for terimber_threadpool:

terimber_log_helper terimber_log threadpool

List of all members.

Public Member Functions

virtual ~terimber_threadpool ()
 destructor
virtual bool borrow_thread (size_t ident, void *data, terimber_thread_employer *client, size_t stay_on_alert_time_msec)=0
 user can call function even inside v_do_real_job function - see above
virtual bool borrow_from_range (size_t from, size_t to, void *data, terimber_thread_employer *client, size_t stay_on_alert_time_msec)=0
 user can ask for a little help and wake up any available thread in the provided range of idents
virtual void revoke_client (terimber_thread_employer *client)=0
 sometimes we need to stop calling client functions immediately however the client function calles already in progress should be completed
virtual void doxray ()=0
 do xray


Detailed Description

abstract interface for the thread pool

Definition at line 63 of file threadpoolfactory.h.


Constructor & Destructor Documentation

virtual terimber_threadpool::~terimber_threadpool (  )  [inline, virtual]

destructor

Definition at line 67 of file threadpoolfactory.h.


Member Function Documentation

virtual bool terimber_threadpool::borrow_thread ( size_t  ident,
void *  data,
terimber_thread_employer client,
size_t  stay_on_alert_time_msec 
) [pure virtual]

user can call function even inside v_do_real_job function - see above

Parameters:
ident  thread ident will be used as input parameter for client thread functions
data  user defined data will be used as input parameter for client thread functions
client  user callback
stay_on_alert_time_msec  time in milliseconds until unused thread will go back to the pool

Implemented in threadpool.

virtual bool terimber_threadpool::borrow_from_range ( size_t  from,
size_t  to,
void *  data,
terimber_thread_employer client,
size_t  stay_on_alert_time_msec 
) [pure virtual]

user can ask for a little help and wake up any available thread in the provided range of idents

Parameters:
from  from ident
to  to ident
data  user defined data will be used as input parameter for client thread functions
client  user callback
stay_on_alert_time_msec  time in milliseconds until unused thread will go back to the pool

Implemented in threadpool.

virtual void terimber_threadpool::revoke_client ( terimber_thread_employer client  )  [pure virtual]

sometimes we need to stop calling client functions immediately however the client function calles already in progress should be completed

Parameters:
client  user callback

Implemented in threadpool.

virtual void terimber_threadpool::doxray (  )  [pure virtual]

do xray

Implemented in threadpool.


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


© Copyright Terimber 2003-.