Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2001, Roxen IS.   //   // The Roxen WebServer main program.   //   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.   // ABS and suicide systems contributed freely by Francesco Chemolli    - constant cvs_version="$Id: roxen.pike,v 1.819 2003/01/16 14:06:22 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.820 2003/01/20 11:23:00 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:989:   //! The function might be run in the backend thread, so it should   //! never run for a considerable time. Instead do another call to   //! @[background_run] to queue it up again after some work has been   //! done, or use @[BackgroundProcess].   {   #ifdef THREADS    if (!hold_wakeup_cond)    // stop_handler_threads is running; ignore more work.    return;    -  void enqueue() +  function enqueue = lambda()    {    bg_queue->write (({func, args}));    if (bg_queue->size() == 1)    handle (bg_process_queue);    };       if (delay)    call_out (enqueue, delay);    else    enqueue();    -  +  enqueue = 0; // To avoid garbage. +    #else    // Can't do much better when we haven't got threads..    call_out (func, delay, @args);   #endif   }      class BackgroundProcess   //! A class to do a task repeatedly in the background, in a way that   //! makes as little impact as possible on the incoming requests (using   //! @[background_run]).