Thread Affinity allows you to manage threads in a straightforward manner to overcome the latency issues sometimes apparent when using the thread scheduler..
If you have an application that is running with multiple threads, most of the time the thread scheduler works well.
Xmust be assigned to one core, and
Zshould use the same core, but different CPUs. The library will find isolated CPUs, and assign the threads based on the rules you provide, on a best effort basis. If you don’t have isolated cores, it will just do its best.
The Thread Affinity library can increase your applications’ performance by allowing threads to be bound to specific cores. This is a benefit if the data is already on the cores
L1 cache, because it won’t have to be reloaded. The open source Thread Affinity library is the ideal choice if you are writing low latency code.