submit(_:)
Submit a given task to be executed by the EventLoop
. Once the execution is complete the returned EventLoopFuture
is notified.
@preconcurrency func submit<T>(_ task: @escaping () throws -> T) -> EventLoopFuture<T>
Parameters
- task
The closure that will be submitted to the
EventLoop
for execution.
Returns
EventLoopFuture
that is notified once the task was executed.