xtd 0.2.0
Loading...
Searching...
No Matches

◆ get_max_threads()

static void xtd::threading::thread_pool::get_max_threads ( size_t &  worker_threads,
size_t &  completion_port_threads 
)
static

Retrieves the number of requests to the thread pool that can be active concurrently. All requests above that number remain queued until thread pool threads become available.

Parameters
worker_threadsThe maximum number of worker threads in the thread pool.
completion_port_threadsThe maximum number of asynchronous I/O threads in the thread pool.
Remarks
When GetMaxThreads returns, the variable specified by worker_threads contains the maximum number of worker threads allowed in the thread pool, and the variable specified by completion_port_threads contains the maximum number of asynchronous I/O threads allowed in the thread pool.
You can use the xtd::threading::thread_pool::get_available_threads method to determine the actual number of threads in the thread pool at any given time.
You can use the xtd::threading::thread_pool::set_max_threads to set the maximum number of worker threads and asynchronous I/O threads in the thread pool.