'linux taskset: Does a thread of a multi-thread process always run on a particular core?

I use the taskset to set a multi-thread process to run on a Linux host as below:

task -c 1,2 ./myprocess

Will a particular thread always run on a particular CPU, for example, thread 1 always run on c1? or it will run on c1 or c2 at different times?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source