Commit e577ba98 authored by Cherry Zhang's avatar Cherry Zhang Committed by Carlos Amedee
Browse files

[release-branch.go1.14] runtime: don't send preemption signal if there is a signal pending

If multiple threads call preemptone to preempt the same M, it may
send many signals to the same M such that it hardly make
progress, causing live-lock problem. Only send a signal if there
isn't already one pending.

Updates #37741.
Fixes #37833.

Change-Id: Id94adb0b95acbd18b23abe637a8dcd81ab41b452
Reviewed-on: https://go-review.googlesource.com/c/go/+/223737


Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarKeith Randall <khr@golang.org>
(cherry picked from commit 0c0e8f22)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223939


Reviewed-by: default avatarAustin Clements <austin@google.com>
parent 229247d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment