コード例 #1
0
 WorldState()
   : pending_threads_(0)
   , should_stop_(0)
   , time_waiting_(0)
 {
   mutex_.init();
   waiting_to_run_.init();
 }
コード例 #2
0
ファイル: world_state.hpp プロジェクト: Halfnhav/rubinius
 WorldState(bool* check_global_interrupts)
   : pending_threads_(0)
   , should_stop_(0)
   , check_global_interrupts_(check_global_interrupts)
   , time_waiting_(0)
 {
   mutex_.init();
   waiting_to_run_.init();
 }
コード例 #3
0
 /**
  * Called after a fork(), when we know we're alone again, to get
  * everything back in the proper order.
  */
 void reinit() {
   // When we're reinitting the world state, we're stopped
   // so we have to initialize pending_threads_ to 0 and
   // should_stop to 1 so we start off in the proper state
   // and can continue after a fork.
   pending_threads_ = 0;
   should_stop_ = 1;
   mutex_.init();
   waiting_to_run_.init();
 }
コード例 #4
0
ファイル: state.cpp プロジェクト: dziulius/rubinius
    void restart() {
      mutex_.init();
      condition_.init();
      pause_condition_.init();

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

      run();
    }
コード例 #5
0
 void unlock() {
   stop_ = false;
   wait_condition_.broadcast();
   lock_.unlock();
 }