Example #1
0
        internal static void AbortBackgroundBatchCompilations()
        {
            Debug.Trace("PreservedAssemblyEntry", "AbortBackgroundBatchCompilations: " + _backgroundBatchCompilations.Count + " threads to abort");

            // drain the preservation and compilation mutexes to make sure they are not owned while
            // the threads are aborted
            _mutex.DrainMutex();
            CompilationLock.DrainMutex();

            lock (_backgroundBatchCompilations) {
                foreach (BackgroundBatchCompiler bbc in _backgroundBatchCompilations)
                {
                    bbc.Abort();
                }
            }
        }
 internal static void DrainMutex()
 {
     _mutex.DrainMutex();
 }