pike.git / lib / modules / Search.pmod / Utils.pmod

version» Context lines:

pike.git/lib/modules/Search.pmod/Utils.pmod:1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Utils.pmod,v 1.40 2003/09/26 13:30:40 anders Exp $ + // $Id: Utils.pmod,v 1.41 2003/09/30 12:14:31 anders Exp $      #if !constant(report_error)   #define report_error werror   #define report_debug werror   #define report_warning werror   #endif      #ifdef SEARCH_DEBUG   # define WERR(X) report_debug("search: "+(X)+"\n");   #else
pike.git/lib/modules/Search.pmod/Utils.pmod:502:    if(!sizeof(crawl_queue) && !sizeof(compact_queue)) return;    next_run = min( @values(crawl_queue)+values(compact_queue)+values(entry_queue) );    reschedule();    }      #if constant (roxen)    private void reschedule() {    if( schedule_process )    schedule_process->stop();    WERR("Scheduler runs next event in "+(next_run-time())+" seconds."); +  // We use BackgroundProcess since there is no support for unscheduling +  // tasks created with background_run.    schedule_process =    roxen.BackgroundProcess(next_run-time(), do_scheduled_stuff);    }       void unschedule() {    if( schedule_process )    schedule_process->stop();    }