clock icon indicating copy to clipboard operation
clock copied to clipboard

Correct unit tests and races

Open billf opened this issue 9 years ago • 2 comments

  • the "too late" go routine did not finish before the end of the function. correct this invalid usage by signalling "too late" using a channel close.
  • the read and writes of the 'ok' boolean failed race detection. avoid ordering issues by using sync/atomic.
  • the counters in the examples also suffered from ordering issues. use an atomic for stronger ordering.

This package now passes go test -race.

billf avatar Nov 21 '16 20:11 billf

friendly ping to @andres-erbsen

billf avatar Jun 02 '17 01:06 billf

hi @andres-erbsen, is there something we can do to assist merging this request?

jkanywhere avatar Dec 22 '18 19:12 jkanywhere