Esempio n. 1
0
        static void Main(string[] args)
        {
            List <Thread> threads = new List <Thread>();

            for (int i = 0; i < 5; i++)
            {
                threads.Add(new Thread(() => ThreadWork()));
            }

            foreach (Thread thread in threads)
            {
                thread.Start();
                thread.Join();
            }


            Console.WriteLine("\n------ Printing report ------ \n");
            foreach (Server server in LoadBalancer.GetInstance().serversList)
            {
                server.PrintReport();
            }

            Console.Read();
        }
Esempio n. 2
0
 public static void PostRequest()
 {
     LoadBalancer.GetInstance().AssignServer();
 }