Esempio n. 1
0
        public static void Stop()
        {
            if (Interlocked.CompareExchange(ref _isEnabled, 0, 1) == 0)
            {
                return;
            }

            // Disable diagnostics
            GCTracker.End();
        }
Esempio n. 2
0
        public static void Run()
        {
            if (Interlocked.CompareExchange(ref _isEnabled, 1, 0) == 1)
            {
                return;
            }

            // Enable diagnostics
            GCTracker.Init();
        }