Attempting to make check.C safe for concurrent use#35
Open
cbroglie wants to merge 2 commits intogo-check:v1from
cbroglie:fix-race-conditions
Open
Attempting to make check.C safe for concurrent use#35cbroglie wants to merge 2 commits intogo-check:v1from cbroglie:fix-race-conditions
cbroglie wants to merge 2 commits intogo-check:v1from
cbroglie:fix-race-conditions
Conversation
This fixes some known issues, there may be others still
Author
|
Fixes issues like these, found by the go race detector: |
|
👍 |
Contributor
|
I'm happy to merge something along these lines, but can we please have a simple mutex instead of a RW one? These are all extremely fast operations which don't benefit from concurrency. |
davecheney
added a commit
to juju/check
that referenced
this pull request
Jun 17, 2015
Fixes go-check#43 Updates go-check#35 This PR removes a data race on C.status if c.Error or c.Assert fails in a goroutine spawned inside a test suite. Renaming the variable to `C._status` is regretable, but made the change to the code accessing the variable via helpers smaller. Tests were _not_ run as they do not pass on recent versions of Go. This fix was verified by asserting that LP 1463643 was resolved.
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.
This fixes some known issues, there may be others still