Skip to content

Extended Protocol

EventLoopGroup

extension EventLoopGroup

Topics

Instance Methods

  • future()
    Creates a new, succeeded EventLoopFuture from the worker’s event loop with a Void value.
  • future(_:)
    Creates a new, succeeded EventLoopFuture from the worker’s event loop.
  • future(error:)
    Creates a new, failed EventLoopFuture from the worker’s event loop.
  • future(result:)
    Creates a new Future from the worker’s event loop, succeeded or failed based on the input Result.
  • makeFutureWithTask(_:)
  • performWithTask(_:)
    Run the async function body on an event loop in this group and return its result as an EventLoopFuture.
  • tryFuture(_:)
    An alternate name for this would be future(catching:), but with that name, trailing closure syntax just looks like el.future { ... }, which does not indicate to readers of the code that it is the error-capturing version. Since such an indication is highly desirable, a slightly less idiomatic name is used instead.