Skip to content

Commit

Permalink
Scheduler: Don't hang when starting an empty graph
Browse files Browse the repository at this point in the history
  • Loading branch information
frankosterfeld committed Oct 1, 2024
1 parent aa1ec79 commit b77c2ca
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/include/gnuradio-4.0/Scheduler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,9 @@ class SchedulerBase : public Block<Derived> {
for (std::size_t runnerID = 0UZ; runnerID < _jobLists->size(); runnerID++) {
_pool->execute([this, runnerID]() { static_cast<Derived*>(this)->poolWorker(runnerID, _jobLists); });
}
_nRunningJobs.wait(0UZ, std::memory_order_acquire); // waits until at least one pool worker started
if (!_jobLists->empty()) {
_nRunningJobs.wait(0UZ, std::memory_order_acquire); // waits until at least one pool worker started
}
}
}

Expand Down

0 comments on commit b77c2ca

Please sign in to comment.