forked from jamiealquiza/tachymeter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There was a data race in `Tachymeter.AddTime`. `m.Count` was atomically incremented, but accessing `m.Times` slice wasn't. As such, calling `AddTime()` from multiple goroutines triggered a data race. The higher the number of goroutines and/or the smaller the value of `m.Size`, the higher the probability of a data race occurring. Fixes jamiealquiza#43 Add -race in travis-ci script
- Loading branch information
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ go: | |
- "1.10" | ||
- "1.11" | ||
- tip | ||
|
||
script: | ||
- go test -v -race -cpu=1,2,4 . | ||
|
This file contains 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
This file contains 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