Salome HOME
Fix Workload Manager for older versions of gcc.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 17 Aug 2020 16:06:24 +0000 (18:06 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Mon, 17 Aug 2020 16:06:24 +0000 (18:06 +0200)
src/workloadmanager/WorkloadManager.cxx

index 716bed0c76811217f5392004c3a8e4c88819c82a..d0ac55609844338209b263123c1122551828b85f 100644 (file)
@@ -59,11 +59,11 @@ namespace WorkloadManager
       std::unique_lock<std::mutex> lock(_data_mutex);
       _stop = false;
     }
-    _otherThreads.emplace_back(std::async([this]
+    _otherThreads.emplace_back(std::async(std::launch::async, [this]
       {
         runTasks();
       }));
-    _otherThreads.emplace_back(std::async([this]
+    _otherThreads.emplace_back(std::async(std::launch::async, [this]
       {
         endTasks();
       }));
@@ -91,7 +91,7 @@ namespace WorkloadManager
       RunningInfo taskInfo;
       while(chooseTaskToRun(taskInfo))
       {
-        _runningTasks.emplace(taskInfo.id, std::async([this, taskInfo]
+        _runningTasks.emplace(taskInfo.id, std::async(std::launch::async, [this, taskInfo]
           {
             runOneTask(taskInfo);
           }));