Nandaka.Common.LimitedConcurrencyLevelTaskScheduler.GetScheduledTasks C# (CSharp) 메소드

GetScheduledTasks() 보호된 최종 메소드

protected final GetScheduledTasks ( ) : IEnumerable
리턴 IEnumerable
        protected override sealed IEnumerable<Task> GetScheduledTasks()
        {
            bool lockTaken = false;
            try
            {
                Monitor.TryEnter(_tasks, ref lockTaken);
                if (lockTaken) return _tasks;
                else throw new NotSupportedException();
            }
            finally
            {
                if (lockTaken) Monitor.Exit(_tasks);
            }
        }