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 - 2009, 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.1070 2010/11/02 17:09:59 marty Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1071 2010/11/05 16:01:15 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:579: Inside #if defined(THREADS)
  #ifdef THREADS   // function handle = threaded_handle;      Thread do_thread_create(string id, function f, mixed ... args)   {    Thread.Thread t = thread_create(f, @args);    name_thread( t, id );    return t;   }    + #if 1 + constant Queue = Thread.Queue; + #else   // Shamelessly uses facts about pikes preemting algorithm.   // Might have to be fixed in the future.   class Queue   //! Thread.Queue lookalike, which uses some archaic and less   //! known features of the preempting algorithm in pike to optimize the   //! read function.   //   // If those archaic and less known features are to depend on the   // interpreter lock in the while loop that waits on the condition   // variable then it doesn't work since Pike always might yield before
Roxen.git/server/base_server/roxen.pike:642: Inside #if defined(THREADS)
   if(w_ptr >= sizeof(buffer))    {    buffer=buffer[r_ptr..]+allocate(8);    w_ptr-=r_ptr;    r_ptr=0;    }    buffer[w_ptr++]=v;    r_cond::signal();    }   } + #endif      #ifndef NO_SLOW_REQ_BT   // This is a system to dump all threads whenever a request takes   // longer than a configurable timeout.      protected Pike.Backend slow_req_monitor; // Set iff slow req bt is enabled.   protected float slow_req_timeout, slow_be_timeout;      protected void slow_req_monitor_thread (Pike.Backend my_monitor)   {