Over this now merged PRs we have switched to a model where there is a single TaskRunner created by Overlord and shared/used by all managers:
Main motivation is that the plans to fix Issue with using snapstate Active for interface repository will require sharing more responsibilities across some SnapManager and previously InterfaceManager tasks (collapsing setup/remove-profiles
and *link-*snap
), in such a way that atomicity enforced through blocked predicates will need to span over tasks from both, which is very awkward unless the tasks all run under one single TaskRunner.
Blocked predicates are now cumulatively added by managers to this single TaskRunner via AddBlocked. The running of a task is naturally blocked if any of these predicates returns true.
This overall change might likely be useful for some of the plans considered under Cross-snap operations, bases, and concurrency as well.