public struct EventLoopIterator : Sequence, IteratorProtocol

An iterator over the EventLoops forming an EventLoopGroup.

Usually returned by an EventLoopGroup‘s makeIterator() method.

let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
group.makeIterator()?.forEach { loop in
    // Do something with each loop
  • Advances to the next EventLoop and returns it, or nil if no next element exists.



    public mutating func next() -> EventLoop?

    Return Value

    The next EventLoop if a next element exists; otherwise, nil.