Public Member Functions | |
ASPOSECPP_SHARED_API bool | QueueUserWorkItem (WaitCallback callback, const System::SharedPtr< System::Object > &state) |
ASPOSECPP_SHARED_API void | GetAvailableThreads (int &wt, int &cpt) |
ASPOSECPP_SHARED_API void | GetMaxThreads (int &wt, int &cpt) |
ASPOSECPP_SHARED_API void | GetMinThreads (int &wt, int &cpt) |
ASPOSECPP_SHARED_API bool | SetMaxThreads (int wt, int cpt) |
ASPOSECPP_SHARED_API bool | SetMinThreads (int wt, int cpt) |
ASPOSECPP_SHARED_API | ThreadPoolImpl () |
Constructor. More... | |
ASPOSECPP_SHARED_API | ~ThreadPoolImpl () |
Destructor. Joins all threads if they were not terminated yet. More... | |
ASPOSECPP_SHARED_API void | JoinAll () |
Joins all owned threads. Waits infinitely. More... | |
Static Public Member Functions | |
static ASPOSECPP_SHARED_API bool & | GetInitialized () |
Thread pool internal data. This is a singleton type with memory management done by access function(s). You should never create instances of it directly.
ASPOSECPP_SHARED_API System::Threading::ThreadPoolImpl::ThreadPoolImpl | ( | ) |
Constructor.
ASPOSECPP_SHARED_API System::Threading::ThreadPoolImpl::~ThreadPoolImpl | ( | ) |
Destructor. Joins all threads if they were not terminated yet.
ASPOSECPP_SHARED_API void System::Threading::ThreadPoolImpl::GetAvailableThreads | ( | int & | wt, |
int & | cpt | ||
) |
Gets number of available threads.
wt | Reference to variable to store number of awailable worker threads. |
cpt | Reference to variable to store number of awailable IO threads. |
|
static |
Gets initialization state singleton.
ASPOSECPP_SHARED_API void System::Threading::ThreadPoolImpl::GetMaxThreads | ( | int & | wt, |
int & | cpt | ||
) |
Gets maximal number of concurrent threads.
wt | Reference to variable to store maximal number of awailable worker threads. |
cpt | Reference to variable to store maximal number of awailable IO threads. |
ASPOSECPP_SHARED_API void System::Threading::ThreadPoolImpl::GetMinThreads | ( | int & | wt, |
int & | cpt | ||
) |
Gets minimal number of threads being created by pool.
wt | Reference to variable to store minimal number of awailable worker threads. |
cpt | Reference to variable to store minimal number of awailable IO threads. |
ASPOSECPP_SHARED_API void System::Threading::ThreadPoolImpl::JoinAll | ( | ) |
Joins all owned threads. Waits infinitely.
ASPOSECPP_SHARED_API bool System::Threading::ThreadPoolImpl::QueueUserWorkItem | ( | WaitCallback | callback, |
const System::SharedPtr< System::Object > & | state | ||
) |
Adds work item to queue.
callback | Callback function to execute. |
state | Callback function argument. |
ASPOSECPP_SHARED_API bool System::Threading::ThreadPoolImpl::SetMaxThreads | ( | int | wt, |
int | cpt | ||
) |
Sets number of threads owned by pool.
wt | Maximal number of worker threads. |
cpt | Maximal number of IO threads. |
ASPOSECPP_SHARED_API bool System::Threading::ThreadPoolImpl::SetMinThreads | ( | int | wt, |
int | cpt | ||
) |
Sets minimal number of threads owned by pool.
wt | Minimal number of worker threads. |
cpt | Minimal number of IO threads. |