Skip to content

Commit fb588cb

Browse files
updated executor
1 parent c00fd92 commit fb588cb

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

taskflow/core/executor.hpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ std::future<void> Executor::run_until(Taskflow& f, P&& pred, C&& c) {
822822
}
823823

824824
// Multi-threaded execution.
825-
bool run_now {false};
825+
//bool run_now {false};
826826
Topology* tpg;
827827
std::future<void> future;
828828

@@ -834,16 +834,18 @@ std::future<void> Executor::run_until(Taskflow& f, P&& pred, C&& c) {
834834
future = tpg->_promise.get_future();
835835

836836
if(f._topologies.size() == 1) {
837-
run_now = true;
837+
//run_now = true;
838+
tpg->_bind(f._graph);
839+
_schedule(tpg->_sources);
838840
}
839841
}
840842

841843
// Notice here calling schedule may cause the topology to be removed sonner
842844
// before the function leaves.
843-
if(run_now) {
844-
tpg->_bind(f._graph);
845-
_schedule(tpg->_sources);
846-
}
845+
//if(run_now) {
846+
// tpg->_bind(f._graph);
847+
// _schedule(tpg->_sources);
848+
//}
847849

848850
return future;
849851
}

0 commit comments

Comments
 (0)