Example #1
0
 // Called after a fork(), when we know we're alone again, to get
 // everything back in the proper order.
 void reinit() {
   mutex_.init();
   waiting_to_stop_.init();
   waiting_to_run_.init();
   pending_threads_ = 1;
   should_stop_ = false;
 }
Example #2
0
    void restart() {
      mutex_.init();
      condition_.init();
      pause_condition_.init();

      state = cUnknown;
      stop_ = false;
      pause_ = false;
      paused_ = false;

      run();
    }