ProcessThread.ProcessorAffinity
을 사용해 보셨습니까? ProcessorAffinity
은 각 프로세서를 비트으로 나타냅니다. 비트 0은 프로세서 1을 나타내며 비트 1은 프로세서 2를 나타냅니다.
지금은 NCrunch에서 구성을 다음 데
var currectProcess = System.Diagnostics.Process.GetCurrentProcess();
foreach(System.Diagnostics.ProcessThread thread in currectProcess.Threads)
{
// this could give you something similar to MaxNumberOfUsedCores
thread.ProcessorAffinity = (IntPtr)0x0007; // Valid processors: 1, 2, or 3
}
, 이전의 C# 샘플과 매우 유사 찾고 그 : NCrunch에 할당
- CPU 코어 : 0, 1, 2
- 예를 들어 Visual Studio에 할당 된 CPU 코어 : 3
NCrunch @ remco-mulder의 작성자 만이 사실인지 여부를 알 수 있습니다.
btw : ReSharper는 unittest의 병렬 실행 스레드 수를 제어하는 비슷한 옵션을 가지고 있습니다.
어쩌면 -> http://stackoverflow.com/questions/2823076/forcing-an-app-to-run-single-core-only 및 http://stackoverflow.com/questions/3429999/force-c- 날카로운 응용 프로그램 - 사용 - 단일 코어 - 인 - PC와 - 멀티 코어 - processo –