Add ConnectionPool HTTP1StateMachine (#416)

This commit is contained in:
Fabian Fett
2021-09-09 15:34:03 +02:00
committed by GitHub
parent 05e570dd87
commit 4d726bad8d
12 changed files with 1480 additions and 31 deletions
@@ -33,11 +33,12 @@ extension HTTPConnectionPool {
self.count == 0
}
func count(for eventLoop: EventLoop?) -> Int {
if let eventLoop = eventLoop {
return self.withEventLoopQueueIfAvailable(for: eventLoop.id) { $0.count } ?? 0
}
return self.generalPurposeQueue.count
var generalPurposeCount: Int {
self.generalPurposeQueue.count
}
func count(for eventLoop: EventLoop) -> Int {
self.withEventLoopQueueIfAvailable(for: eventLoop.id) { $0.count } ?? 0
}
func isEmpty(for eventLoop: EventLoop?) -> Bool {