예제 #1
0
 public AdManager()
 {
     this.AdList             = new AdList();
     this.NextList           = new AdList();
     this.olock              = new object();
     Globals.ADManagerThread = new Thread(new ThreadStart(AdService));
     Globals.ADManagerThread.Start();
 }
예제 #2
0
 private void ShiftNext() // olock here sysncs client threads from addtonext on adlist and nextlist objs
 {
     lock (olock)
     {
         NextList.AddAll(AdList.GetListUnlocked());
         AdList   = NextList;
         NextList = new AdList();
     }
 }