Extended Protocol
EventLoopGroup
extension EventLoopGroup
Topics
Instance Methods
func future() -> EventLoopFuture<Void>Creates a new, succeededEventLoopFuturefrom the worker’s event loop with aVoidvalue.func future<T>(T) -> EventLoopFuture<T>Creates a new, succeededEventLoopFuturefrom the worker’s event loop.func future<T>(error: any Error) -> EventLoopFuture<T>Creates a new, failedEventLoopFuturefrom the worker’s event loop.func future<T>(result: Result<T, any Error>) -> EventLoopFuture<T>Creates a newFuturefrom the worker’s event loop, succeeded or failed based on the inputResult.func makeFutureWithTask<Value>(() async throws -> Value) -> EventLoopFuture<Value>func performWithTask<Value>(() async throws -> Value) -> EventLoopFuture<Value>Run theasyncfunctionbodyon an event loop in this group and return its result as anEventLoopFuture.func tryFuture<T>(() throws -> T) -> EventLoopFuture<T>An alternate name for this would befuture(catching:), but with that name, trailing closure syntax just looks likeel.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.