ソースを参照

using while is safer in a thread environment

Nathalie Furmento 15 年 前
コミット
8dabb67ad1
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      src/core/jobs.c

+ 1 - 1
src/core/jobs.c

@@ -81,7 +81,7 @@ void _starpu_wait_job(starpu_job_t j)
 
 	PTHREAD_MUTEX_LOCK(&j->sync_mutex);
 
-	if (!j->terminated)
+	while (!j->terminated)
 		pthread_cond_wait(&j->sync_cond, &j->sync_mutex);
 
 	/* reset the job state so that it can be reused again */