Refactoring thread affinity settings.

There was a bug in setting affinity of a thread that assumed affinity from lookup table with key being a thread name. When names was appended with consecutive numbers (e.g. "RenderingThread 1") the mechanism failed. Refactored this to use special static consts describing affinity override'able by different platforms for different affinity types + possibility of setting affinity per thread.
#codereview Jaroslaw.Surowiec

[CL 2070197 by Jaroslaw Palczynski in Main branch]
This commit is contained in:
Jaroslaw Palczynski
2014-05-12 08:40:54 -04:00
committed by UnrealBot
parent 67f71f60de
commit 724ea452a5
36 changed files with 148 additions and 185 deletions

View File

@@ -55,7 +55,7 @@ FDDCCleanup::FDDCCleanup()
, StopTaskCounter(0)
{
// Don't delete the runnable automatically. It's going to be manually deleted in FDDCCleanup::Shutdown.
Thread = FRunnableThread::Create(this, TEXT("FDDCCleanup"), 0, TPri_BelowNormal);
Thread = FRunnableThread::Create(this, TEXT("FDDCCleanup"), 0, TPri_BelowNormal, FPlatformAffinity::GetPoolThreadMask());
}
FDDCCleanup::~FDDCCleanup()