Example #1
0
        private async Task EnqueueCalls(RpcQueue queue, int threadNumber, int threadsCount, int callsCount)
        {
            for (int i = threadNumber; i < callsCount; i += threadsCount)
            {
                await queue.Enqueue(new RpcCall());

                if (threadNumber == 0)
                {
                    await Task.Delay(10); // Task 0 is slow for testing
                }
            }
        }