Documentation for this section has not yet been entered.
The processor affinity of a thread is the set of processors it has a relationship to. In other words, those it can be scheduled to run on.
ProcessThread.ProcessorAffinity represents each processor as a bit. Bit 0 represents processor one, bit 1 represents processor two, and so on. The following table shows a subset of the possible ProcessThread.ProcessorAffinity for a four-processor system.
1 or 2
1 or 3
1, 2, or 3
1, 2, 3, or 4
You can also specify the single, preferred processor for a thread by setting the ProcessThread.IdealProcessor property. A process thread can migrate from processor to processor, with each migration reloading the processor cache. Specifying a processor for a thread can improve performance under heavy system loads by reducing the number of times the processor cache is reloaded.