Assigning a thread to a specific processor core

AFAIK, you can assign a thread to the processor core in Linux. (see this ). But, to my question, can I achieve this functionality using boost , and if possible, how? Please also not that the OS can decide which is best for me, but suppose I want to control this behavior in my design.

+3
source share
3 answers

Boost is designed to be used as a cross-platform library, while the question you linked indicates a specific OS implementation, as far as I know, this is the only way to do what you ask.

+4
source

Windows SetThreadAffinityMask API . , , .

+2

The topic is called "thread affinity", you can find the answer by doing a search, as well as your exact version of the operating system.

0
source

Source: https://habr.com/ru/post/1789752/


All Articles