EventLoopGroup

public protocol EventLoopGroup : AnyObject

Provides an endless stream of EventLoops to use.

  • Returns the next EventLoop to use.

    Declaration

    Swift

    func next() -> EventLoop
  • Shuts down the eventloop gracefully. This function is clearly an outlier in that it uses a completion callback instead of an EventLoopFuture. The reason for that is that NIO’s EventLoopFutures will call back on an event loop. The virtue of this function is to shut the event loop down. To work around that we call back on a DispatchQueue instead.

    Declaration

    Swift

    func shutdownGracefully(queue: DispatchQueue, _ callback: @escaping (Error?) -> Void)
  • makeIterator() Default implementation

    Returns an EventLoopIterator over the EventLoops in this EventLoopGroup.

    Note

    The return value of makeIterator is currently optional as requiring it would be SemVer major. From NIO 2.0.0 on it will return a non-optional iterator.

    Default Implementation

    Declaration

    Swift

    func makeIterator() -> EventLoopIterator?

    Return Value

    EventLoopIterator

  • shutdownGracefully(_:) Extension method

    Undocumented

    Declaration

    Swift

    public func shutdownGracefully(_ callback: @escaping (Error?) -> Void)
  • syncShutdownGracefully() Extension method

    Undocumented

    Declaration

    Swift

    public func syncShutdownGracefully() throws