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.1113 2012/02/27 23:32:11 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.1114 2012/06/07 12:12:09 grubba 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:630: Inside #if defined(THREADS)
   // above. (Must have an extra ref to the mutex since the    // MutexKey doesn't keep one.)    Thread.Mutex m = Thread.Mutex();    r_cond::wait (m->lock());    }    mixed tmp = buffer[r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.    return tmp;    }    -  mixed tryread() +  mixed try_read()    {    if (!(w_ptr - r_ptr)) return ([])[0];    mixed tmp = buffer[r_ptr];    buffer[r_ptr++] = 0; // Throw away any references.    return tmp;    }       // Warning: This function isn't thread safe.    void write(mixed v)    {
Roxen.git/server/base_server/roxen.pike:1055:      void release_handler_threads (int numthreads)   //! Releases any handler threads put on hold. If necessary new threads   //! are started to ensure that at least @[numthreads] threads are   //! responding. Threads that haven't arrived to the hold state since   //! @[hold_handler_threads] are considered nonresponding.   {    if (Thread.Condition cond = hold_wakeup_cond) {    // Flush out any remaining hold messages from the queue.    for (int i = handle_queue->size(); i && num_hold_messages; i--) { -  mixed task = handle_queue->tryread(); +  mixed task = handle_queue->try_read();    if (task == 1) num_hold_messages--;    else handle_queue->write (task);    }   #ifdef DEBUG    if (num_hold_messages)    error ("num_hold_messages is bogus (%d).\n", num_hold_messages);   #endif    num_hold_messages = 0;       int blocked_threads = number_of_threads - threads_on_hold;