ext/iodine/fio.c
/* reactor pattern cycling - common actions */
reactor pattern cycling - common actions
reactor pattern cycling - common actions
static void fio_cycle_schedule_events(void) {
  static int idle = 0;
  static time_t last_to_review = 0;
  fio_mark_time();
  fio_timer_schedule();
  if (fio_signal_children_flag) {
    fio_signal_children_flag = 0;
    fio_cluster_signal_children();
  }
  int events = fio_poll();
  if (events < 0) {
    return;
  }
  if (events > 0) {
    idle = 1;
  } else {
    if (idle) {
      fio_state_callback_force(FIO_CALL_ON_IDLE);
      idle = 0;
    }
  }
  if (fio_data->need_review && fio_data->last_cycle.tv_sec != last_to_review) {
    last_to_review = fio_data->last_cycle.tv_sec;
    fio_data->need_review = 0;
    fio_defer_push_task(fio_review_timeout, (void *)0, NULL);
  }
}
static void fio_cycle_schedule_events ( void ) { static int idle = 0 ; static time_t last_to_review = 0 ; fio_mark_time ( ) ; fio_timer_schedule ( ) ; if ( fio_signal_children_flag ) { fio_signal_children_flag = 0 ; fio_cluster_signal_children ( ) ; } int events = fio_poll ( ) ; if ( events < 0 ) { return ; } if ( events > 0 ) { idle = 1 ; } else { if ( idle ) { fio_state_callback_force ( FIO_CALL_ON_IDLE ) ; idle = 0 ; } } if ( fio_data -> need_review && fio_data -> last_cycle . tv_sec != last_to_review ) { last_to_review = fio_data -> last_cycle . tv_sec ; fio_data -> need_review = 0 ; fio_defer_push_task ( fio_review_timeout , ( void * ) 0 , NULL ) ; } }
reactor pattern cycling - common actions
reactor pattern cycling - common actions
/* hot restart support */ /* events == 0 */