Exemple #1
0
        IEnumerator Coroutine()
        {
            while (true)
            {
                IRequest request;

                if (Stopwatch.Await())
                {
                    yield return(null);

                    Stopwatch.Restart();
                }

                while (requestQueue.Count == 0)
                {
                    yield return(null);
                }

                lock (asyncLock)
                {
                    request = requestQueue.Dequeue();
                }

                Do(request);
            }
        }