ocaml-multicore/domainslib

`num_domains` argument in setup_pool

kayceesrk opened this issue · 3 comments

Task.setup_pool takes the number of additional domains as the argument and sets up the pool. See for example

https://github.com/ocaml-multicore/domainslib/blob/master/test/game_of_life_multicore.ml#L65

I found this a little unintuitive as num_domains seems to suggest that the pool would contain num_domains domains. For example, a pool with 2 domains is created with

T.setup_pool ~num_domains:1 

Should we change the semantics such that num_domains actually refers to the number of domains in the pool, and not the number of additional domains?

If we agree to this, we will need to make a new release, change the tests, and the sandmark benchmarks, at the very least.

I'm not particularly inclined towards either; (a) creating pool of num_domains as suggested in this issue or (b) creating a pool of num_domains additional domains along with the parent domain effectively making it a pool of num_domains + 1 as is done now. #31 attempts to clarify in the docs that we do (b) now, which I think was not explicitly mentioned.

ctk21 commented

Closing this issue as it has been addressed in PR #31