-
Notifications
You must be signed in to change notification settings - Fork 125
Access to ConnectionPool.count should be thread safe #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Milestone
Comments
PR #319 as a proposed solution |
I believe we’re done here: see #319 (comment) for more reasoning. |
@weissi has a good reference for a TSAN issue in 5.3 that manifests this way. |
@fabianfett I think we can close this? |
I'll add it to the http/2 milestone and close it as soon as the connection pool has landed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ConnectionPool has a collection of
providers
registered with the pool and access to the collection is guarded by ConnectionPool.lock.Size of the collection is exposed through
count
accessor without guarding by the lock.https://github.com/swift-server/async-http-client/blob/1.2.2/Sources/AsyncHTTPClient/ConnectionPool.swift#L112
That leads to warnings in thread safety analyser.
To reproduce run with thread safety analyzer:
Analysis of output shows that this
count
accessor is main source of thread safety warnings.The text was updated successfully, but these errors were encountered: