@Override
    public Map<TaskId, Set<TopicPartition>> drainPendingStandbyTasksForTopologies(final Set<String> currentTopologies) {
        final Map<TaskId, Set<TopicPartition>> pendingActiveTasksForTopologies =
            filterMap(pendingStandbyTasksToCreate, t -> currentTopologies.contains(t.getKey().topologyName()));

        pendingStandbyTasksToCreate.keySet().removeAll(pendingActiveTasksForTopologies.keySet());

        return pendingActiveTasksForTopologies;
    }
All tasks contained by the Streams instance.

Note that these tasks are shared between the TaskManager (stream thread) and the StateUpdater (restore thread),
i.e. all running active tasks are processed by the former and all restoring active tasks and standby tasks are
processed by the latter.
streams/src/main/java/org/apache/kafka/streams/processor/internals/Tasks.java