     /// - parameters:
     ///   - channel: The `Channel` to add to the `ChannelCollector`.
     func channelAdded(_ channel: Channel) throws {
-        assert(self.eventLoop.inEventLoop)
+        self.eventLoop.assertInEventLoop()
 
         guard self.lifecycleState != .shutdownCompleted else {
             channel.close(promise: nil)

    }

    private func shutdownCompleted() {
        assert(self.eventLoop.inEventLoop)
        assert(self.lifecycleState == .shuttingDown)

        self.lifecycleState = .shutdownCompleted

    }

    private func channelRemoved0(_ channel: Channel) {
        self.eventLoop.assertInEventLoop()
        precondition(self.openChannels.keys.contains(ObjectIdentifier(channel)),
                     "channel \(channel) not in ChannelCollector \(self.openChannels)")

