]> Cypherpunks repositories - gostls13.git/commitdiff
doc: document atexit_sleep_ms flag in race_detector
authorDaniel Martí <mvdan@mvdan.cc>
Sun, 13 Oct 2019 12:18:03 +0000 (13:18 +0100)
committerHeschi Kreinick <heschi@google.com>
Fri, 3 Jan 2020 23:49:42 +0000 (23:49 +0000)
It was pointed out to me that the thread sanitizer library has many more
flags than the ones documented in this doc page. In particular, I was
able to make use of GORACE=atexit_sleep_ms=10 to reduce the amount that
'go test -race' will sleep before finishing.

I'm sure that this flag will be useful to others in the future, so add
it here. This is still not a complete list, but we can simply add useful
flags that work when we think they deserve a mention.

Change-Id: If199d36fd80a0945af90055d110519e5dba27361
Reviewed-on: https://go-review.googlesource.com/c/go/+/200863
Reviewed-by: Heschi Kreinick <heschi@google.com>
doc/articles/race_detector.html

index 2f18acfbfbf5f28e1e7e475df2780d50bfc0ad24..1c449da5c099980a7f14e0182ba61c484003ba4b 100644 (file)
@@ -133,6 +133,11 @@ cost of increased memory usage.
 <code>halt_on_error</code> (default <code>0</code>): Controls whether the program
 exits after reporting first data race.
 </li>
+
+<li>
+<code>atexit_sleep_ms</code> (default <code>1000</code>): Amount of milliseconds
+to sleep in the main goroutine before exiting.
+</li>
 </ul>
 
 <p>