Merge lp:~dave-cheney/gocheck/003-serialise-log-writes into lp:gocheck
Proposed by
Dave Cheney
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 83 | ||||
Proposed branch: | lp:~dave-cheney/gocheck/003-serialise-log-writes | ||||
Merge into: | lp:gocheck | ||||
Diff against target: |
159 lines (+62/-16) 2 files modified
gocheck.go (+39/-14) helpers_test.go (+23/-2) |
||||
To merge this branch: | bzr merge lp:~dave-cheney/gocheck/003-serialise-log-writes | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gustavo Niemeyer | Pending | ||
Review via email: mp+138378@code.launchpad.net |
Description of the change
gocheck: serialize log writes
Fixes LP #1084878.
The race detector cannot profile gocheck tested code due to this race.
To post a comment you must log in.
LGTM with a few thoughts below
https:/ /codereview. appspot. com/6862050/ diff/5/ gocheck. go
File gocheck.go (right):
https:/ /codereview. appspot. com/6862050/ diff/5/ gocheck. go#newcode620 ger/logger/
gocheck.go:620: type serialisedLogger struct {
s/serialisedLog
and lose the interface type?
https:/ /codereview. appspot. com/6862050/ diff/5/ helpers_ test.go
File helpers_test.go (right):
https:/ /codereview. appspot. com/6862050/ diff/5/ helpers_ test.go# newcode441 test.go: 441: go func(i int) {
helpers_
personally i think that:
i := i
reads more naturally than declaring a parameter and passing it.
https:/ /codereview. appspot. com/6862050/ diff/5/ helpers_ test.go# newcode449 test.go: 449: start.Done()
helpers_
this seems a slightly inappropriate use of sync.WaitGroup. i'd use a
channel for this and close it to start everything.
https:/ /codereview. appspot. com/6862050/