This commit is contained in:
Simon Cruanes 2023-06-13 13:52:06 -04:00
parent a9a51b08c4
commit b084caea69
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -36,9 +36,17 @@ 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 on_exit_thread called at the end of each thread in the pool @param min minimum size of the pool. It will be at least [1] internally,
@param thread_wrappers a list of {!thread_loop_wrapper} functions so [0] or negative values make no sense.
to use for this pool's workers. @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 thread_wrappers a list of {!thread_loop_wrapper} functions
to use for this pool's workers.
*) *)
val size : t -> int val size : t -> int