httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/experimental/threadpool threadpool.c
Date Sun, 28 Apr 2002 22:32:17 GMT
aaron       02/04/28 15:32:17

  Modified:    server/mpm/experimental/threadpool threadpool.c
  Log:
  Clarify an incorrect statement about why we're purposfully putting
  the signal inside of a mutex.
  
  Revision  Changes    Path
  1.4       +10 -4     httpd-2.0/server/mpm/experimental/threadpool/threadpool.c
  
  Index: threadpool.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/experimental/threadpool/threadpool.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- threadpool.c	28 Apr 2002 22:25:16 -0000	1.3
  +++ threadpool.c	28 Apr 2002 22:32:17 -0000	1.4
  @@ -952,8 +952,11 @@
                   /* Wake up the sleeping worker. */
                   apr_thread_mutex_lock(worker->mutex);
                   worker->csd = (apr_socket_t *)csd;
  -                /* We must own the lock associated with the condition
  -                 * variable that we are signaling. */
  +                /* Posix allows us to signal this condition without
  +                 * owning the associated mutex, but in that case it can
  +                 * not guarantee predictable scheduling. See
  +                 * _UNIX Network Programming: Interprocess Communication_
  +                 * by W. Richard Stevens, Vol 2, 2nd Ed, pp. 170-171. */
                   apr_thread_cond_signal(worker->cond);
                   apr_thread_mutex_unlock(worker->mutex);
                   worker = NULL;
  @@ -975,8 +978,11 @@
       worker_stack_interrupt_all(idle_worker_stack);
       if (worker) {
           apr_thread_mutex_lock(worker->mutex);
  -        /* We must own the lock associated with the condition
  -         * variable that we are signaling. */
  +        /* Posix allows us to signal this condition without
  +         * owning the associated mutex, but in that case it can
  +         * not guarantee predictable scheduling. See
  +         * _UNIX Network Programming: Interprocess Communication_
  +         * by W. Richard Stevens, Vol 2, 2nd Ed, pp. 170-171. */
           apr_thread_cond_signal(worker->cond);
           apr_thread_mutex_unlock(worker->mutex);
       }
  
  
  

Mime
View raw message