Skip to content

Conversation

@fabianfett
Copy link
Member

Follow up to #418

finalclassManager{
privatetypealiasKey=ConnectionPool.Key

enumState{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: private

}

deinit{
guard case .shutDown =self.state else{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about shutting down? You could call shutdown and not bother waiting for the future to complete as well, I assume?

}
}

func shutdown(on eventLoop:EventLoop)->EventLoopFuture<Bool>{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the Bool here?

self.state =.shutDown
return.done(future)
}else{
letpromise= eventLoop.makePromise(of:Bool.self)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a comment here to indicate when this promise is completed.


case.shuttingDown(let promise,let soFarUnclean):
guardself._pools.removeValue(forKey: pool.key)=== pool else{
preconditionFailure("Expected that the pool was ")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That suspense is killing me!

Comment on lines 30 to 33
leteventLoopGroup:EventLoopGroup
letconfiguration:HTTPClient.Configuration
letconnectionIDGenerator=Connection.ID.globalGenerator
letlogger:Logger
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private?

Copy link
Collaborator

@glbrnttglbrntt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fabianfettfabianfett merged commit fb49c1b into swift-server:mainSep 10, 2021
@fabianfettfabianfett deleted the ff-pool-manager branch September 10, 2021 15:25
@fabianfettfabianfett added this to the HTTP/2 support milestone Sep 10, 2021
@fabianfettfabianfett mentioned this pull request Sep 10, 2021
@fabianfettfabianfett added the 🔨 semver/patch No public API change. label Sep 20, 2021
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patchNo public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@fabianfett@Lukasa@glbrntt