Task
public final class Task<Response>
Response execution context. Will be created by the library and could be used for obtaining
EventLoopFuture<Response> of the execution or cancellation of the execution.
-
The
EventLoopthe delegate will be executed on.Declaration
Swift
public let eventLoop: EventLoop -
EventLoopFuturefor the response returned by this request.Declaration
Swift
public var futureResult: EventLoopFuture<Response> { get } -
Waits for execution of this request to complete.
Throws
The error value of theEventLoopFutureif it errors.Declaration
Swift
public func wait() throws -> ResponseReturn Value
The value of the
EventLoopFuturewhen it completes. -
Cancels the request execution.
Declaration
Swift
public func cancel()
View on GitHub
Install in Dash
Task Class Reference