The issue here is actually [SR-9033] Dispatch spins in a tight loop when receiving EPOLLHUP · Issue #644 · apple/swift-corelibs-libdispatch · GitHub . The proposed PR is actually not addressing the real issue but hides it (but it creates a 100% CPU spin as Pierre points out on the PR).
SR-9033 is actually a serious bug in Dispatch on Linux that will affect anything that can create EPOLLHUPs, namely UNIX pipes, UNIX domain sockets, as well as TCP sockets
.