There is a common pattern of "synchronization":
var result ...
go func() {
...
result = ...
}()
time.Sleep(time.Second) // 1 second should be enough for everyone
if bad(result) {
complain()
}
C++ ThreadSanitizer prints a useful "As if synchronized via sleep" message
with a stack trace of the sleep:
http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/lit_tests/sleep_sync.cc?view=markup
It would be useful to do the same for Go.
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: