Also cancel sub-tasks (those that are awaited by this one) when cancelling a task.

This commit is contained in:
2023-11-18 22:20:47 +01:00
parent d98e14285b
commit 065181fc69
2 changed files with 92 additions and 48 deletions

View File

@@ -180,7 +180,7 @@ void MultiThreadedTaskLoop::transferCurrentTask(TaskLoop& otherLoop) noexcept
return;
}
MIJIN_ASSERT_FATAL(currentTask_ != nullptr, "Trying to call transferCurrentTask() while not running a task!");
MIJIN_ASSERT_FATAL(impl::gCurrentTask != nullptr, "Trying to call transferCurrentTask() while not running a task!");
// now start the transfer, first disown the task
StoredTask storedTask = std::move(*impl::gCurrentTask);