Beispiel #1
0
 public ManagedThreadPool()
 {
     ToBeAdded = new Queue<ManagedThreadTimer>();
     ToBeRemoved = new Queue<ManagedThreadTimer>();
     CurrentlyUsed = new List<ManagedThreadTimer>();
     thread = new ServerBase.Thread(100);
     thread.Execute += new Action(thread_Execute);
     thread.Start();
 }
Beispiel #2
0
 public void Check(DateTime now)
 {
     if (now > LastGoThrough.AddMilliseconds(3000))
     {
         if (thread != null)
             thread.Closed = true;
         thread = new ServerBase.Thread(100);
         thread.Execute += new Action(thread_Execute);
         thread.Start();
     }
 }
Beispiel #3
0
 public void StartPool()
 {
     if (thread != null)
         if (!thread.Closed)
         thread.Closed = true;
     thread = new ServerBase.Thread(1000);
     thread.Execute += new Action(Checker);
     thread.Start();
 }