Create a pool of threads. A pool of threads is a declaration for
creating threads with shared properties (stack sizes) and a
limited number of threads. Threads are created using
thread_create_in_pool/4. If all threads in the pool are in use,
the behaviour depends on the wait
option of
thread_create_in_pool/4 and the backlog
option described
below. Options are passed to thread_create/3, except for
- backlog(+MaxBackLog)
- Maximum number of requests that can be suspended. Default
is
infinite
. Otherwise it must be a non-negative integer.
Using backlog(0)
will never delay thread creation for this
pool.
The pooling mechanism does not interact with the detached
state of a thread. Threads can be created both detached
and
normal and must be joined using thread_join/2 if they are not
detached.