domainslib
domainslib copied to clipboard
Make `num_domains` argument to `Task.setup_pool` optional
The OCaml 5.0 includes Domain.recommended_domain_count which seems to be a reasonable default value for Task.setup_pool. Making the argument optional is code-compatible with existing code.
This would also create a mechanism within Task to use Domain.recommended_domain_count without incurring the "unstable" alert on the Domain module.
This sounds like a good idea.
Separately, I am also wondering whether to make the pool an optional argument. The current pool can be fetched from the context now that we have an effect handler in domainslib.