Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCPoolOfThreads.html below:
NCBI C++ ToolKit: CPoolOfThreads< TRequest
Public Member Functions CPoolOfThreads (unsigned int max_threads, unsigned int queue_size, unsigned int spawn_threshold=1, unsigned int max_urgent_threads=kMax_UInt, const string &thread_name=kEmptyStr) Constructor. More...
virtual ~CPoolOfThreads (void) Destructor. More...
void Spawn (unsigned int num_threads) Start processing threads. More...
TItemHandle AcceptRequest (const TRequest &request, TUserPriority priority=0, unsigned int timeout_sec=0, unsigned int timeout_nsec=0) Put a request in the queue with a given priority. More...
TItemHandle AcceptUrgentRequest (const TRequest &request, unsigned int timeout_sec=0, unsigned int timeout_nsec=0) Puts a request in the queue with the highest priority It will run a new thread even if the maximum of allowed threads has been already reached. More...
void WaitForRoom (unsigned int timeout_sec=kMax_UInt, unsigned int timeout_nsec=0) Wait for the room in the queue up to timeout_sec + timeout_nsec/1E9 seconds. More...
bool IsFull (void) const Check if the queue is full. More...
bool IsEmpty (void) const Check if the queue is empty. More...
bool HasImmediateRoom (bool urgent=false) const Check whether a new request could be immediately processed. More...
void SetUserPriority (TItemHandle handle, TUserPriority priority) Adjust a pending request's priority. More...
void Withdraw (TItemHandle handle) Withdraw a pending request from consideration. More...
size_t GetQueueSize (void) const Get the number of requests in the queue. More...
template<typename TRequest>
class CPoolOfThreads< TRequest >
CThreadInPool<> – abstract request-handling thread.
CPoolOfThreads<> – abstract pool of threads sharing a request queue.
Definition at line 386 of file thread_pool_old.hpp.
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4