소스 검색

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

Nathalie Furmento 16 년 전
부모
커밋
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);
 	pthread_mutex_lock(&mutex);
-	if (!finished)
+	while (!finished)
 		pthread_cond_wait(&cond, &mutex);
 		pthread_cond_wait(&cond, &mutex);
 	pthread_mutex_unlock(&mutex);
 	pthread_mutex_unlock(&mutex);