performWithTask(_:)
Run the async
function body
on this event loop and return its result as an EventLoopFuture
.
This declaration has been renamed to EventLoop.makeFutureWithTask(_:).
This declaration is deprecated.
func performWithTask<Value>(_ body: @escaping () async throws -> Value) -> EventLoopFuture<Value>
Parameters
- body
The
async
function to run.
Returns
An EventLoopFuture
which is completed when body
finishes. On success the future has the result returned by body
; if body
throws an error, the future is failed with that error.
This function can be used to bridge the async
world into an EventLoop
.
This method is deprecated. Call EventLoop.makeFutureWithTask(_:)
directly instead.