flatSubmit(_:)

Submit task to be run on this EventLoop.

EventLoop.swift:982
@preconcurrency func flatSubmit<T>(_ task: @escaping () -> EventLoopFuture<T>) -> EventLoopFuture<T> where T : Sendable

Parameters

task

The asynchronous task to run. As with everything that runs on the EventLoop, it must not block.

Returns

An EventLoopFuture identical to the EventLoopFuture returned from task.

The returned EventLoopFuture will be completed when task has finished running. It will be identical to the EventLoopFuture returned by task.