In the threads branch there is a hardcoded number MAX_THREADS 8, now 16.
I added support to determine the number of cpus at runtime in Parrot_get_num_cpus()
This is a better default.
But users might want to try more.
So let's add a Configure option --maxthreads which sets MAX_THREADS,
and a parrot cmdline option --numthreads which overrides Parrot_get_num_cpus().
For embed and languages this should be exported via API also:
[GH #830] Implement platform Parrot_get_num_cpus
Parrot_get_num_cpus is the new default instead of MAX_THREADS. Initialized at startup
[GH #830] Add Parrot_set_num_threads and --numthreads cmdline
The new parrot cmdline option --numthreads overrides Parrot_get_num_cpus().
Parrot_set_num_threads is called by Parrot_interp_initialize_interpreter()
Left over is a parrot cmdline test
[t] Add some tests for the new --numthreads command-line option #830
Implemented. Left over is a --maxthreads configure option.
But I think I have a better idea, I'll work on in a rurban/threads_array_heap branch.
Do not use a static threads_array, malloc it on the heap. This way we can easily
test 4000 threads FWIW.
@rurban are you still wanting a --maxthreads configure option? @jkeenan might be interested to work on that ...