Represents a server-side thread pool. More...
#include <ThreadPool.hpp>
Inherits enable_shared_from_this< ThreadPool >.
Public Member Functions | |
void | setThreadMinCount (std::size_t threadMinCount) |
Sets the minimum number of threads in the thread pool. | |
std::size_t | getThreadMinCount () const |
Returns the minimum number of threads in the thread pool. | |
void | setThreadMaxCount (std::size_t threadMaxCount) |
Sets the maximum number of threads in the thread pool. | |
std::size_t | getThreadMaxCount () const |
Returns the maximum number of threads in the thread pool. | |
void | setThreadIdleTimeoutMs (boost::uint32_t threadIdleTimeoutMs) |
boost::uint32_t | getThreadIdleTimeoutMs () const |
Returns the thread idle timeout value, in milliseconds. | |
void | setReserveLastThread (bool reserveLastThread) |
void | setThreadName (const std::string &threadName) |
Sets the thread name of the thread pool threads, as visible in a debugger. | |
std::string | getThreadName () const |
Returns the thread name of the thread pool threads. | |
Represents a server-side thread pool.
void RCF::ThreadPool::setReserveLastThread | ( | bool | reserveLastThread | ) |
If this setting is true, clients will receive an error message right away, if all threads in the thread pool are busy. Otherwise, the client will wait for a thread in the thread pool to become free.
void RCF::ThreadPool::setThreadIdleTimeoutMs | ( | boost::uint32_t | threadIdleTimeoutMs | ) |
Sets the thread idle timeout value, in milliseconds. After a thread has been idle for this time, it will be shut down, unless the thread count is already at the minimum value for the thread pool.