ec_thread_pool_create_module
Name
ec_thread_pool_create_module — Create a module thread pool
Synopsis
#include "ec_thread_pool.h"
| int **ec_thread_pool_create_module** (
| self, | |
| | type, | |
| | concurrency, | |
| | stack_size, | |
| | max_queue_len)
; | |
generic_module_infrastructure * <var class="pdparam">self</var>
;
const char * <var class="pdparam">type</var>
;
int <var class="pdparam">concurrency</var>
;
size_t <var class="pdparam">stack_size</var>
;
size_t <var class="pdparam">max_queue_len</var>
;
Description
Create a module thread pool.
- self
-
The module reference. For a description of this data type see generic_module_infrastructure.
- type
-
The thread pool type,
io
, for example. See also threadpool. - concurrency
-
The concurrency of the thread pool.
- stack_size
-
The stack size. If the stack size is
0
, then the system default will be used. - max_queue_len
-
If this parameter is non zero, then a semaphore will be employed to prevent the queue length exceeding this value.
On success this function returns the pool ID; on failure, -1
is returned.
It is legal to call this function in the Scheduler
thread.