瀏覽代碼

tests/core/execute_on_a_specific_worker: while is safer to wait for termination

Nathalie Furmento 14 年之前
父節點
當前提交
a62e973ade
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tests/core/execute_on_a_specific_worker.c

+ 1 - 1
tests/core/execute_on_a_specific_worker.c

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