Don't use a hardcoded core number.

Instead use number_of_cores / 2.
To be TO BE SUASHED
Second attempt.
Merge pull request #432 from XhmikosR/workers

Don't use a hardcoded core number.