On 4/28/2014 4:24 PM, Claudiu Popa wrote:
This issue raised too much bikeshedding. To wrap it up, I'll modify
the patch with the following:
- processes renamed to workers
- `workers` defaults to 1
- When `workers` is equal to 0, then `os.cpu_count` will be used
- When `workers` > 1, multiple processes will be used
- When `workers` == 1, run normally (no multiple processes)
I presume you mean for this to be the default.
- Negative values really should raise a ValueError (as
multiprocessing.Pool and soon
concurrent.futures.Thread/ProcessPoolExecutor)
Yay!
- Will raise NotImplementedError if multiprocessing can't be used
(when `workers` equals to 0 or > 1)
If anyone agrees with the above, then I'll modify the patch.
Having read the thread, though not much of the issue, these look to me
like the best choices for a clean, comprehensible API.
> This will
be its last iteration, any other bikeshedding
should be addressed by the core dev who'll apply it.
--
Terry Jan Reedy
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com