Example #1
0
            IEnumerator <TValue> IEnumerable <TValue> .GetEnumerator()
            {
                TValue result;

                while (_Dictionary.TryDequeue(out result))
                {
                    yield return(result);
                }
            }
Example #2
0
        public RevaleeTask DoleTask()
        {
            RevaleeTask task;

            while (_AwaitingTaskCollection.TryDequeue(out task))
            {
                if (task.AttemptsRemaining == 0)
                {
                    lock (_SyncRoot)
                    {
                        _PersistenceProvider.RemoveTask(task);
                    }

                    Supervisor.Telemetry.DecrementAwaitingTasksValue();
                    continue;
                }

                return(task);
            }

            return(null);
        }