]> Cypherpunks repositories - gostls13.git/commit
runtime: add test for mutex starvation
authorRhys Hiltner <rhys.hiltner@gmail.com>
Mon, 28 Oct 2024 19:21:33 +0000 (12:21 -0700)
committerGopher Robot <gobot@golang.org>
Thu, 14 Nov 2024 22:05:16 +0000 (22:05 +0000)
commit9fe70bcd65b1380d53d68c9653f973efe8e2657f
tree335b2f635982a576abfe9fa2800a5f2f26cb07c1
parentc79a486be20b395bdd198be9112e633623665988
runtime: add test for mutex starvation

When multiple threads all need to acquire the same runtime.mutex, make
sure that none of them has to wait for too long. Measure how long a
single thread can capture the mutex, and how long individual other
threads must go between having a turn with the mutex.

For #68578

Change-Id: I56ecc551232f9c2730c128a9f8eeb7bd45c2d3b5
Reviewed-on: https://go-review.googlesource.com/c/go/+/622995
Auto-Submit: Rhys Hiltner <rhys.hiltner@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/runtime/runtime_test.go