diff options
| author | Michael Pratt <mpratt@google.com> | 2022-07-14 17:36:59 -0400 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2022-08-12 01:38:55 +0000 |
| commit | bd302502d39b6172bf3db6abfa49fdcaa124ee50 (patch) | |
| tree | 3b5ad6d467a4f529f8416d6989c880a7f28d27d7 /src/runtime/proc.go | |
| parent | 7666ec1c99b2f8c88b42fb5462510cafce120a6f (diff) | |
| download | go-bd302502d39b6172bf3db6abfa49fdcaa124ee50.tar.xz | |
runtime: convert panicking to atomic type
For #53821.
Change-Id: I93409f377881a3c029b41b0f1fbcef5e21091f2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/419438
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 33219419f9..33d7d6f552 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -265,7 +265,7 @@ func main() { Gosched() } } - if atomic.Load(&panicking) != 0 { + if panicking.Load() != 0 { gopark(nil, nil, waitReasonPanicWait, traceEvGoStop, 1) } @@ -5016,7 +5016,7 @@ func checkdead() { // freezetheworld will cause all running threads to block. // And runtime will essentially enter into deadlock state, // except that there is a thread that will call exit soon. - if panicking > 0 { + if panicking.Load() > 0 { return } |
