Limit the number of async tasks to the number of available CPU cores