-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
kind/enhancementImprovements to existing feature.Improvements to existing feature.
Milestone
Description
In some cases it's desirable to be able to control which EventLoop
a request is executed on. For instance, if uploading a file using NIO's NonBlockingFileIO
we currently incur the cost of hopping between the event loop reading from disk and the event loop writing to the network on every chunk.
HTTPClient.execute
could be updated as follows:
public func execute<T: HTTPClientResponseDelegate>(request: Request, delegate: T, eventLoop: EventLoop? = nil, deadline: NIODeadline? = nil) -> Task<T.Response> {
let eventLoop = eventLoop ?? self.eventLoopGroup.next()
...
}
Metadata
Metadata
Assignees
Labels
kind/enhancementImprovements to existing feature.Improvements to existing feature.