예제 #1
0
        void OnDestroy()
        {
            foreach (var thread in registeredThreads)
            {
                thread.Dispose();
            }

            if (CurrentDispatcher != null)
            {
                CurrentDispatcher.Dispose();
            }
            CurrentDispatcher = null;

            if (CurrentTaskDistributor != null)
            {
                CurrentTaskDistributor.Dispose();
            }
            CurrentTaskDistributor = null;
        }
예제 #2
0
        protected override void OnDestroy()
        {
            foreach (var thread in _registeredThreads)
            {
                thread.Dispose();
            }

            if (CurrentDispatcher != null)
            {
                CurrentDispatcher.Dispose();
            }
            CurrentDispatcher = null;

            if (CurrentTaskDistributor != null)
            {
                CurrentTaskDistributor.Dispose();
            }
            CurrentTaskDistributor = null;

            base.OnDestroy();
        }