         return promise.futureResult
     }
     
+    /// Remove a `ChannelHandlerContext` from the `ChannelPipeline`. Must only be called from within the `EventLoop`.
     private func remove0(_ fn: @escaping ((ChannelHandlerContext) -> Bool)) -> EventLoopFuture<Bool> {
         let promise: EventLoopPromise<Bool> = eventLoop.newPromise()
         if eventLoop.inEventLoop {

    private var idx: Int = 0
    private var destroyed: Bool = false
    
    public var eventLoop: EventLoop {
        return channel.eventLoop
    }

    public unowned let channel: Channel

    public func add(name: String? = nil, handler: ChannelHandler, first: Bool = false) -> EventLoopFuture<Void> {
        let promise: EventLoopPromise<Void> = eventLoop.newPromise()
        if eventLoop.inEventLoop {

        return promise.futureResult
    }
    
    /// Remove a `ChannelHandlerContext` from the internal storage.
    private func removeFromStorage(context: ChannelHandlerContext) {
        // Update the linked-list structure after removal
        if inboundChain === context {
