mirror of
https://github.com/Zygo/bees.git
synced 2025-05-17 21:35:45 +02:00
task: do not allow queue loops in priority queueing mode
Tasks using non-priority FIFO dependency tracking can insert themselves into their own queue, to run the Task again immediately after it exits. For priority queues, this attempts to splice the post-exec queue into itself, which doesn't seem like a good idea. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
parent
de9d72da80
commit
a819d623f7
@ -328,6 +328,7 @@ namespace crucible {
|
|||||||
TaskState::insert(const TaskStatePtr &task)
|
TaskState::insert(const TaskStatePtr &task)
|
||||||
{
|
{
|
||||||
THROW_CHECK0(invalid_argument, task);
|
THROW_CHECK0(invalid_argument, task);
|
||||||
|
THROW_CHECK2(invalid_argument, m_id, task->m_id, m_id != task->m_id);
|
||||||
PairLock lock(m_mutex, task->m_mutex);
|
PairLock lock(m_mutex, task->m_mutex);
|
||||||
if (!task->m_run_now) {
|
if (!task->m_run_now) {
|
||||||
task->m_run_now = true;
|
task->m_run_now = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user