aboutsummaryrefslogtreecommitdiff
path: root/lib/executor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/executor.cc')
-rw-r--r--lib/executor.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/executor.cc b/lib/executor.cc
index fb79b49..af49f0e 100644
--- a/lib/executor.cc
+++ b/lib/executor.cc
@@ -12,6 +12,9 @@ namespace nMatcha {
void Executor::run() {
for (const std::unique_ptr<Thread>& t : mThreads) {
+ if (t->isFinished()) {
+ continue;
+ }
yield_to(t.get());
}
}