From: Wilfried Goesgens Date: Tue, 21 Feb 2012 22:46:41 +0000 (+0100) Subject: sleep() isn't defined to be per thread; use usleep() instead which is. X-Git-Tag: v8.11~185 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e1270db35d02e0c12db7417c4912451b0c664132;hp=eef0aa8dfaf6928394a5465603d5390895a7e743 sleep() isn't defined to be per thread; use usleep() instead which is. --- diff --git a/citadel/threads.c b/citadel/threads.c index 59aae25d2..a9fce4eb4 100644 --- a/citadel/threads.c +++ b/citadel/threads.c @@ -207,7 +207,7 @@ void go_threading(void) if ((active_workers == num_workers) && (num_workers < 256)) { CtdlThreadCreate(worker_thread); } - sleep(1); + usleep(1000); } /* When we get to this point we are getting ready to shut down our Citadel server */ @@ -221,6 +221,6 @@ void go_threading(void) syslog(LOG_DEBUG, "Waiting %d seconds for %d worker threads to exit", countdown, num_workers ); - sleep(1); + usleep(1000); } }