Araq / malebolgia

Malebolgia creates new spawns. Structured concurrency. Thread pools and related APIs.
MIT License
104 stars 10 forks source link

Set the number of threads at run time #27

Open tsoj opened 10 months ago

tsoj commented 10 months ago

While the ThreadPoolSize property can be set during compile time, it would be neat to be able to do that during runtime, to avoid being required to compile different versions for machines with different number of cores.

Maybe making the setup proc public and allow passing a thread num argument to it could be a solution.

Edit: On second thoughts, it would also be nice to specify the pool's size per master instead of globally, but I see that this would require a more substantial change and also would change the semantics of the library significantly.