Add ability to set thread_per_core