Commit 9c721238 authored by Florian Mayer's avatar Florian Mayer Committed by Lukas Sommer
Browse files

Insert missing thread pool shutdown routine (exectx.shutdown()). This will...

Insert missing thread pool shutdown routine (exectx.shutdown()). This will work only under the assumption that each executor of _all_ available job types make sure to terminate only after the tasks they spawned will have fully completed. If this is not a sensible assumption, the stop() procedure would have to wait until Tasks::_queued and Tasks::_running is empty (this is sufficient because processingThread will have been terminated by then).
parent 0fa7cbba
Pipeline #1262 passed with stages
in 145 minutes and 50 seconds
......@@ -125,6 +125,7 @@ class Tasks(maxParallel: Option[Int] = None) extends Publisher {
def stop(): Unit = {
_stop = true
if (processingThread.isAlive()) processingThread.interrupt()
_exectx.shutdown();
}
private[this] var _stop = false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment