From: Brian Aker Date: Wed, 15 Oct 2008 05:24:24 +0000 (-0700) Subject: Saving fix for busy wait X-Git-Tag: 0.25~15 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b9795632aa1e69a27215a1c20e51ca8f999feed5;p=m6w6%2Flibmemcached Saving fix for busy wait --- diff --git a/clients/memslap.c b/clients/memslap.c index 4a4f9a2e..7aa69ead 100644 --- a/clients/memslap.c +++ b/clients/memslap.c @@ -206,14 +206,7 @@ void scheduler(memcached_server_st *servers, conclusions_st *conclusion) */ pthread_mutex_lock(&counter_mutex); while (thread_counter) - { - struct timespec abstime; - - memset(&abstime, 0, sizeof(struct timespec)); - abstime.tv_sec= 10; - - pthread_cond_timedwait(&count_threshhold, &counter_mutex, &abstime); - } + pthread_cond_wait(&count_threshhold, &counter_mutex); pthread_mutex_unlock(&counter_mutex); gettimeofday(&end_time, NULL);