Saving fix for busy wait
authorBrian Aker <brian@tangent.org>
Wed, 15 Oct 2008 05:24:24 +0000 (22:24 -0700)
committerBrian Aker <brian@tangent.org>
Wed, 15 Oct 2008 05:24:24 +0000 (22:24 -0700)
clients/memslap.c

index 4a4f9a2eb9def19ddacb6c27afdc900313256f09..7aa69eadf543f7b039269e89c038857a2b2a578f 100644 (file)
@@ -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);