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 - 2004, 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.975 2010/05/11 13:14:47 grubba Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.976 2010/06/03 12:06:48 noring 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:1145: Inside #if defined(DEBUG_BACKGROUND_RUN)
   map (args, lambda (mixed arg)    {return sprintf ("%O", arg);}) * ", ",    bg_queue->size());   #endif      #ifdef THREADS    if (!hold_wakeup_cond)    // stop_handler_threads is running; ignore more work.    return 0;    -  function enqueue = lambda() +  class enqueue(function func, mixed ... args)    { -  +  int __hash() { return hash_value(func); } +  int `==(mixed gunc) { return func == gunc; } +  string _sprintf() { return sprintf("background_run(%O)", func); } +  mixed `()() +  {    bg_queue->write (({func, args}));    if (!bg_process_running)    handle (bg_process_queue); -  +  }    };    -  // Be careful to zero enqueue below to avoid trampoline garbage. -  +     if (delay) -  // A trick to zero enqueue without putting the call_out return -  // value into a local variable. -  return call_out (enqueue, (enqueue = 0, delay)); +  return call_out (enqueue(func, @args), delay);    else { -  enqueue(); -  enqueue = 0; +  enqueue(func, @args)();    return 0;    }   #else    // Can't do much better when we haven't got threads..    return call_out (func, delay, @args);   #endif   }      class BackgroundProcess   //! A class to do a task repeatedly in the background, in a way that
Roxen.git/server/base_server/roxen.pike:1250:    void start()    //! Restart a stopped process.    {    int state = stopping;    stopping = 0;    if (state & 2) {    background_run (period, repeat, func, args);    }    }    -  string _sprintf() {return "BackgroundProcess()";} +  string _sprintf() +  { +  return sprintf("BackgroundProcess(%O, %O)", period, func);    } -  + }         mapping get_port_options( string key )   //! Get the options for the key 'key'.   //! The intepretation of the options is protocol specific.   {    return (query( "port_options" )[ key ] || ([]));   }      void set_port_options( string key, mapping value )