public void ThreadBegin(Semaphore s) { NumThreads++; s.WaitOne(); if (!MChessChess.TaskBegin()) { ChessDetach(); } OnWakeUp(); if (MyEngine.EnvironmentVars.FlipPreemptSense) { MChessChess.PreemptionDisable(); } }