Skip to content

Commit

Permalink
Stop worker if free, fixes #1062
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Dec 15, 2021
1 parent 8ff4c4d commit 9dc5905
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ dwv.utils.ThreadPool = function (poolSize) {
// use input thread to run the waiting task
workerThread.run(workerTask);
} else {
// stop the worker
workerThread.stop();
// no task to run, add to free list
freeThreads.push(workerThread);
// remove from running list
Expand Down

0 comments on commit 9dc5905

Please sign in to comment.