Explorar el Código

minor fix to avoid spurious condition variable awaking

Cédric Augonnet hace 15 años
padre
commit
7c7752e348
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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);