mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 11:15:38 -05:00
docs
This commit is contained in:
parent
a9a51b08c4
commit
b084caea69
1 changed files with 11 additions and 3 deletions
|
|
@ -36,6 +36,14 @@ val create :
|
||||||
(** [create ()] makes a new thread pool.
|
(** [create ()] makes a new thread pool.
|
||||||
@param on_init_thread called at the beginning of each new thread
|
@param on_init_thread called at the beginning of each new thread
|
||||||
in the pool.
|
in the pool.
|
||||||
|
@param min minimum size of the pool. It will be at least [1] internally,
|
||||||
|
so [0] or negative values make no sense.
|
||||||
|
@param per_domain is the number of threads allocated per domain in the fixed
|
||||||
|
domain pool. The default value is [0], but setting, say, [~per_domain:2]
|
||||||
|
means that if there are [8] domains (which might be the case on an 8-core machine)
|
||||||
|
then the minimum size of the pool is [16].
|
||||||
|
If both [min] and [per_domain] are specified, the maximum of both
|
||||||
|
[min] and [per_domain * num_of_domains] is used.
|
||||||
@param on_exit_thread called at the end of each thread in the pool
|
@param on_exit_thread called at the end of each thread in the pool
|
||||||
@param thread_wrappers a list of {!thread_loop_wrapper} functions
|
@param thread_wrappers a list of {!thread_loop_wrapper} functions
|
||||||
to use for this pool's workers.
|
to use for this pool's workers.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue