diff Core/JobsEngine/JobsEngine.cpp @ 2581:8da2cffc2378 jobs

JobsRegistry::Cancel()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 11 May 2018 17:33:19 +0200
parents 3372c5255333
children 441f23af9d89
line wrap: on
line diff
--- a/Core/JobsEngine/JobsEngine.cpp	Fri May 11 09:35:17 2018 +0200
+++ b/Core/JobsEngine/JobsEngine.cpp	Fri May 11 17:33:19 2018 +0200
@@ -60,6 +60,13 @@
       return false;
     }
 
+    if (running.IsCancelScheduled())
+    {
+      running.GetJob().ReleaseResources();
+      running.MarkCanceled();
+      return false;
+    }
+
     std::auto_ptr<JobStepResult> result;
 
     {