Exemplo n.º 1
0
 private static void InitializePassengerAlgo()
 {
     if (PassAlgo == null)
     {
         lock (typeof(ModeChoiceHousehold))
         {
             System.Threading.Thread.MemoryBarrier();
             if (PassAlgo == null)
             {
                 PassAlgo = new PassengerAlgo(TashaRuntime);
                 System.Threading.Thread.MemoryBarrier();
             }
         }
     }
 }
Exemplo n.º 2
0
 private void InitializePassengerAlgo()
 {
     if (PassAlgo == null)
     {
         lock (this)
         {
             System.Threading.Thread.MemoryBarrier();
             if (PassAlgo == null)
             {
                 PassAlgo = new PassengerAlgo(Root);
                 System.Threading.Thread.MemoryBarrier();
             }
         }
     }
 }