Browse Source

followup to 14220: do not join the thread either when STARPU_WATCHDOG_TIMEOU is not set

Samuel Thibault 10 years ago
parent
commit
cbe9542ca2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/core/task.c

+ 5 - 0
src/core/task.c

@@ -1174,5 +1174,10 @@ void _starpu_watchdog_init(void)
 
 
 void _starpu_watchdog_shutdown(void)
 void _starpu_watchdog_shutdown(void)
 {
 {
+	char *timeout_env = getenv("STARPU_WATCHDOG_TIMEOUT");
+
+	if (!timeout_env)
+		return;
+
 	starpu_pthread_join(watchdog_thread, NULL);
 	starpu_pthread_join(watchdog_thread, NULL);
 }
 }