add thread affinity