]> Cypherpunks repositories - gostls13.git/commit
runtime: usleep in TestWeakToStrongMarkTermination
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 13 Dec 2024 23:18:59 +0000 (23:18 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 16 Dec 2024 16:57:31 +0000 (08:57 -0800)
commit3bd08b97921826c1b0a5fbf0789f4b49d7619977
tree623e1e3d8904ba84d8d90b736f422c8459667253
parent18b5435fc84225ca303da7a110c7e8065dc4bbda
runtime: usleep in TestWeakToStrongMarkTermination

There's a subtle bug in this test (big surprise): time.Sleep allocates,
so the time.Sleep(100*time.Millisecond) before unblocking gcMarkDone
might itself end up in gcMarkDone.

Work around this by using usleep here instead.

Fixes #70532.

Change-Id: I4c642ebb12f737cdb0d79ccff64b6059fc3d8b34
Reviewed-on: https://go-review.googlesource.com/c/go/+/636155
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/gc_test.go