summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/TaskMan.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/TaskMan.cc b/src/TaskMan.cc
index dd4a07a..8e4e941 100644
--- a/src/TaskMan.cc
+++ b/src/TaskMan.cc
@@ -294,7 +294,9 @@ int Balau::TaskMan::mainLoop() {
if ((t->getStatus() == Task::STOPPED) || (t->getStatus() == Task::FAULTED)) {
stopped.insert(t);
} else if (t->getStatus() == Task::YIELDED) {
- yielded.insert(t);
+ taskHash_t::iterator i = yielded.find(t);
+ if (i == yielded.end())
+ yielded.insert(t);
toRemoveFromYielded = false;
}
if (toRemoveFromYielded) {