private bool Dequeue() { if (this.queue.Count > 0) { CacheTask cacheTask = this.queue.Dequeue(); this.coroutineProxy(cacheTask.Run()); return(true); } return(false); }
public IEnumerator QueueProcessor() { for (;;) { if (this.queue.Count > 0) { CacheTask task = this.queue.Dequeue(); yield return(task.Run()); } else { yield return(0); } } }
public void Enqueue(CacheTask task) { this.queue.Enqueue(task); }