Example #1
0
        private static void CallersAction(CallCenter center)
        {
            Random random = new Random();

            while (true)
            {
                int clientId     = random.Next(1, 10000);
                int waitingCount = center.Call(clientId);
                Log($"Incoming call from {clientId}, waiting in the queue: {waitingCount}");
                Thread.Sleep(random.Next(1000, 5000));
            }
        }