Required Instance Methodswift-nio 2.81.0NIOCore

submit(_:)

Submit a given task to be executed by the EventLoop. Once the execution is complete the returned EventLoopFuture is notified.

EventLoop.swift:270
@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.