public Set<Task> readOnlyActiveTasks() {
        return readyOnlyAllTasks().stream()
            .filter(Task::isActive).collect(Collectors.toSet());
    }
Getting the list of current active tasks of the thread;
Note that the returned list may be used by other thread than the StreamThread itself,
and hence need to be read-only
streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java