shutdown(queue:_:)

Shuts down the client and event loop gracefully.

HTTPClient.swift:250
@preconcurrency func shutdown(queue: DispatchQueue = .global(), _ callback: @escaping (Error?) -> Void)

This function is clearly an outlier in that it uses a completion callback instead of an EventLoopFuture. The reason for that is that NIO’s EventLoopFutures will call back on an event loop. The virtue of this function is to shut the event loop down. To work around that we call back on a DispatchQueue instead.