Browse Source

minor fix to avoid spurious condition variable awaking

Cédric Augonnet 15 years ago
parent
commit
7c7752e348
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/microbenchs/async_tasks_overhead.c

+ 1 - 1
tests/microbenchs/async_tasks_overhead.c

@@ -147,7 +147,7 @@ int main(int argc, char **argv)
 	}
 
 	pthread_mutex_lock(&mutex);
-	if (!finished)
+	while (!finished)
 		pthread_cond_wait(&cond, &mutex);
 	pthread_mutex_unlock(&mutex);