Closed
Description
I'm not 100% sure if this counts as a bug but I think it should because it makes the programming model really hard.
If I configure
let desiredEL = context.eventLoop // or some other EL I like
let req = try HTTPClient.Request(url: url, method: req.method, headers: req.headers, body: .stream { _ in desiredEL.preconditionInEventLoop() })
let task = self.httpClient.execute(request: req,
delegate: self,
eventLoop: .delegate(on: desiredEL))
this would fail as the closure passed to .stream
isn't executed on desiredEL
.