wait on the correct object, instead of calling sleep#881
Closed
vtjnash wants to merge 2 commits intoJuliaWeb:masterfrom
Closed
wait on the correct object, instead of calling sleep#881vtjnash wants to merge 2 commits intoJuliaWeb:masterfrom
vtjnash wants to merge 2 commits intoJuliaWeb:masterfrom
Conversation
quinnj
reviewed
Jul 15, 2022
quinnj
reviewed
Jul 15, 2022
| close(s.listener) | ||
| # first pass to mark or request connections to close | ||
| for c in s.connections | ||
| for c in collect(s.connections) |
Member
Author
There was a problem hiding this comment.
close is a yield point and you are missing a lock here. The collect helps minimize the data race window
- Using sleep usually indicates a design issue with the code, and introduced a few minor data races into this code. - Provides various opportunities for code cleanup. - Provides some opportunities for fixing some of the error handling.
ef8eff7 to
c8e0792
Compare
Codecov Report
@@ Coverage Diff @@
## master #881 +/- ##
==========================================
+ Coverage 79.94% 80.50% +0.55%
==========================================
Files 36 36
Lines 2872 3072 +200
==========================================
+ Hits 2296 2473 +177
- Misses 576 599 +23
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Member
|
I think this has been integrated piecemeal in other PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using sleep usually indicates a design issue with the code, and
introduced a few minor data races into this code. Provides various
opportunities for code cleanup also.
Seemed to be needed along with JuliaLang/MbedTLS.jl#243, though I can't remember why.