pike.git / lib / modules / Filesystem.pmod / Monitor.pmod / basic.pike

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1157:   {    mixed key = monitor_mutex->lock();    monitor_queue->remove(m);   }      //! Update the position in the @[monitor_queue] for the monitor @[m]   //! to account for an updated next_poll value.   protected void adjust_monitor(Monitor m)   {    mixed key = monitor_mutex->lock(); +  int old_min = monitor_queue->peek()->next_poll;    monitor_queue->adjust(m); -  +  if ((m->next_poll < old_min) && co_id && (co_id != 1)) { +  // Nonblocking mode and we need to poll earlier, +  // so reschedule the call_out. +  MON_WERR("Rescheduling call_out.\n"); +  if (backend) backend->remove_call_out(co_id); +  else remove_call_out(co_id); +  co_id = 0; +  set_nonblocking();    } -  + }      //! Create a new @[Monitor] for a @[path].   //!   //! This function is called by @[monitor()] to create a new @[Monitor]   //! object.   //!   //! The default implementation just calls @[DefaultMonitor] with the   //! same arguments.   //!   //! @seealso