Beispiel #1
0
 protected override void run_task()
 {
     _service.hold_work();
     _service.push_option(delegate()
     {
         run_a_round();
         _service.release_work();
     });
 }
Beispiel #2
0
        protected override void run_task()
        {
            curr_strand currStrand = _currStrand.Value;

            if (null == currStrand)
            {
                currStrand        = new curr_strand(false, _service);
                _currStrand.Value = currStrand;
            }
            running_a_round(currStrand);
            _service.release_work();
        }
Beispiel #3
0
 public void stop()
 {
     _service.release_work();
     for (int i = 0; i < _runThreads.Length; i++)
     {
         _runThreads[i].Join();
     }
     _runThreads = null;
 }
Beispiel #4
0
 public void stop()
 {
     _service.release_work();
     foreach (Thread thread in _runThreads)
     {
         thread.Join();
     }
     _runThreads = null;
 }
Beispiel #5
0
 public void Dispose()
 {
     _service.release_work();
 }