Deadlock When Using DispatchQueue from Swift Task

DispatchQueue is over-committing, but if you’re enqueuing to a queue with queue.sync, you’re also tying up a thread that may be from an executor that is not. sync has the isolation properties of the queue but doesn’t change the underlying reality of what thread you’re on.

1 Like