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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1258:    if (!next_monitor) {    error("%O: Monitor queue is empty!\n", this_function);    }       int old_min = next_monitor->next_poll;    monitor_queue->adjust(m);    if (m->next_poll >= old_min) {    return;    }    -  if (co_id && (co_id != 1)) { +  if (co_id) {    // 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();    }   }   
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1602:   }      //! Backend to use.   //!   //! If @expr{0@} (zero) - use the default backend.   protected Pike.Backend backend;      //! Call-out identifier for @[backend_check()] if in   //! nonblocking mode.   //! - //! Set to @expr{1@} when non_blocking mode without call_outs - //! is in use. - //! +    //! @seealso   //! @[set_nonblocking()], @[set_blocking()]   protected mixed co_id;      //! Change backend.   //!   //! @param backend   //! Backend to use. @expr{0@} (zero) for the default backend.   void set_backend(Pike.Backend|void backend)   {
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1657:   //! Backend check callback function.   //!   //! This function is intended to be called from a backend,   //! and performs a @[check()] followed by rescheduling   //! itself via a call to @[set_nonblocking()].   //!   //! @seealso   //! @[check()], @[set_nonblocking()]   protected void backend_check()   { -  if (co_id != 1) co_id = 0; +  co_id = 0; +     int t;    mixed err = catch {    t = check(0);    };    set_nonblocking(t);    if (err) throw(err);   }      //! Turn on nonblocking mode.   //!