Ejemplo n.º 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();
 }
Ejemplo n.º 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();
     }
 }