diff --git a/Sources/NIO/BlockingIOThreadPool.swift b/Sources/NIO/BlockingIOThreadPool.swift index 93351869..9a33d0ab 100644 --- a/Sources/NIO/BlockingIOThreadPool.swift +++ b/Sources/NIO/BlockingIOThreadPool.swift @@ -169,6 +169,15 @@ public final class BlockingIOThreadPool { } } } + + deinit { + switch self.state { + case .stopped, .shuttingDown: + () + default: + assertionFailure("wrong state \(self.state)") + } + } } public extension BlockingIOThreadPool {