Esempio n. 1
0
 public static LoadBalancer GetLoadBalancer()
 {
     // Support multithreaded applications through
     // 'Double checked locking' pattern which (once
     // the instance exists) avoids locking each
     // time the method is invoked
     if (_instance == null)
     {
         lock (syncLock)
         {
             if (_instance == null)
             {
                 _instance = new LoadBalancer();
             }
         }
     }
     return _instance;
 }