+ // At this point in time the DrainManager and all objects will be
+ // in the the Drained state. New objects (i.e., objects created
+ // while resuming) will inherit the Resuming state from the
+ // DrainManager, which means we have to resume objects until all
+ // objects are in the Running state.
+ _state = DrainState::Resuming;
+
+ do {
+ DPRINTF(Drain, "Resuming %u objects.\n", drainableCount());
+ for (auto *obj : _allDrainable) {
+ if (obj->drainState() != DrainState::Running) {
+ assert(obj->drainState() == DrainState::Drained ||
+ obj->drainState() == DrainState::Resuming);
+ obj->dmDrainResume();
+ }
+ }
+ } while (!allInState(DrainState::Running));
+