|
| CStdPoolOfThreads (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 | ~CStdPoolOfThreads () |
|
virtual void | KillAllThreads (TKillFlags flags) |
| Causes all threads in the pool to exit cleanly after finishing all pending requests, optionally waiting for them to die. More...
|
|
virtual void | KillAllThreads (bool wait) |
| Causes all threads in the pool to exit cleanly after finishing all pending requests, optionally waiting for them to die. More...
|
|
virtual void | Register (TThread &thread) |
| Register a thread. More...
|
|
virtual void | UnRegister (TThread &thread) |
| Unregister a thread. More...
|
|
| 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 CRef< CStdRequest > &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 CRef< CStdRequest > &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...
|
|
Definition at line 606 of file thread_pool_old.hpp.