sets number of threads by number of available processor cores