fyi, same question was asked there: Deadlock Issue When Accessing Thread-Safe Objects within Task+withTaskGroup.