 public enum ChannelPipelineError : Error {
     case alreadyRemoved
     case alreadyClosed
+    case notFound
 }
 
 

    }
    
    public func remove(handler: ChannelHandler) -> Future<Bool> {
        let promise: Promise<Bool> = eventLoop.newPromise()
        if eventLoop.inEventLoop {
            remove0(handler: handler, promise: promise)
        } else {
            eventLoop.execute {
                self.remove0(handler: handler, promise: promise)
            }
        }
        return promise.futureResult

        assert(eventLoop.inEventLoop)
        
        while let ctx = contexts.first {
            remove0(ctx: ctx, promise:  eventLoop.newPromise())
        }
        
        // We need to set the next reference to nil to ensure we not leak memory due a cycle-reference.
