public AdManager() { this.AdList = new AdList(); this.NextList = new AdList(); this.olock = new object(); Globals.ADManagerThread = new Thread(new ThreadStart(AdService)); Globals.ADManagerThread.Start(); }
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(); } }