Переглянути джерело

minor fix to avoid spurious condition variable awaking

Cédric Augonnet 15 роки тому
батько
коміт
7c7752e348
1 змінених файлів з 1 додано та 1 видалено
  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);