public void ThreadedCompile(bool skipFinalization = false) { Setup(); if (!CompilerSettings.MethodScanner) { ScheduleAll(); } lock (_lock) { if (Stage != CompileStage.Ready) { return; } Stage = CompileStage.Executing; } var maxThreads = CompilerSettings.MaxThreads != 0 ? CompilerSettings.MaxThreads : Environment.ProcessorCount; Compiler.ExecuteThreadedCompile(maxThreads); lock (_lock) { Stage = CompileStage.Ready; } if (!skipFinalization) { Finalization(); } }
public void ExecuteThreaded() { Initialize(); PreCompile(); ScheduleAll(); Compiler.ExecuteThreadedCompile(MaxThreads); PostCompile(); }