Exemple #1
0
    private void PerformRequest()
    {
        while (running)
        {
            Request request;
            bool    completed = requests.TryDequeue(out request);

            if (completed)
            {
                request.Perform();
            }

            completedRequests.Enqueue(request);

            Thread.Sleep(sleepMilliseconds);
        }
    }
Exemple #2
0
    public void QueueRequest(Request request)
    {
        request.PrePerformance();

        requests.Enqueue(request);
    }