pike.git / src / threads.c

version» Context lines:

pike.git/src/threads.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: threads.c,v 1.281 2009/09/29 11:09:33 mast Exp $ + || $Id: threads.c,v 1.282 2010/02/18 14:50:41 srb Exp $   */      #include "global.h"      PMOD_EXPORT int num_threads = 1;   PMOD_EXPORT int threads_disabled = 0;      /* #define PICKY_MUTEX */      #ifdef _REENTRANT
pike.git/src/threads.c:2660: Inside #if defined(DO_PIKE_CLEANUP)
   for (th = thread_table_chains[i]; th; th = th->hashlink)    if (th != Pike_interpreter.thread_state) {    low_thread_kill (th);    num_kills++;    }    }    mt_unlock (&thread_table_lock);       while (num_pending_interrupts && time (NULL) < timeout) {    THREADS_ALLOW(); - #ifdef __NT__ -  Sleep (1); - #elif defined (HAVE_USLEEP) -  usleep (1000); - #else -  sleep (1); - #endif +  sysleep(1.0);    THREADS_DISALLOW();    }      #if 0    if (num_kills) {    fprintf (stderr, "Killed %d thread(s) in exit cleanup",    num_kills - num_pending_interrupts);    if (num_pending_interrupts)    fprintf (stderr, ", %d more haven't responded", num_pending_interrupts);    fputs (".\n", stderr);