Unable to fix Deadlock when using combine

I tried to keep removing components until the deadlock disappear (after all, serializing everything won't deadlock). So I found that for a dead lock to happen, you need to repeatedly and concurrently do the following:

  1. You run a block in dispatchQueue,
  2. The block prints anything,
  3. The block runs print(X) on a separated concurrent queue, where
    • X is CustomStringConvertible that uses dispatchQueue inside description.

#3 is extremely peculiar. As you've mentioned, it needs to be exactly print(X), any other variations will make the deadlock disappear, including

print(X.description)
print("\(X)")
_ = "\(X)"

let desc = "\(X)"
print(desc)

Making me thing there might be some problem with the compiler.

PS

In all seriousness, I planned to suggest that you use print("\(X)") just to confuse you even further :smiling_imp: