Question

In setting the number of processes, I'd be keen to see how many threads I can actually use on my machine - how do I find this? Is there a way to determine the number of threads available to me?

Was it helpful?

Solution

Do you want to know the CPU count?

According to the docs, when you start a pool and don't sepecify the number of processes, the default number is the number of cpu's on the system:

processes is the number of worker processes to use. If processes is None then the number returned by cpu_count() is used. If initializer is not None then each worker process will call initializer(*initargs) when it starts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top