aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/traceback.go
diff options
context:
space:
mode:
authorRichard Musiol <mail@richard-musiol.de>2019-10-10 22:38:26 +0200
committerRichard Musiol <neelance@gmail.com>2019-10-11 18:09:33 +0000
commit2686e7494845dae877e0efb4ff786c672b2cd2ef (patch)
treee425983c821567c7c12332293f3664e04b9d6cb1 /src/runtime/traceback.go
parent426bfbe9a375aebf5df2fbc5eb340fccc0466382 (diff)
downloadgo-2686e7494845dae877e0efb4ff786c672b2cd2ef.tar.gz
go-2686e7494845dae877e0efb4ff786c672b2cd2ef.zip
runtime: make goroutine for wasm async events short-lived
An extra goroutine is necessary to handle asynchronous events on wasm. However, we do not want this goroutine to exist all the time. This change makes it short-lived, so it ends after the asynchronous event was handled. Fixes #34768 Change-Id: I24626ff0af9d803a01ebe33fbb584d04d2059a44 Reviewed-on: https://go-review.googlesource.com/c/go/+/200497 Run-TryBot: Richard Musiol <neelance@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/traceback.go')
-rw-r--r--src/runtime/traceback.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime/traceback.go b/src/runtime/traceback.go
index 96fb33c04b..0e4b75a7e6 100644
--- a/src/runtime/traceback.go
+++ b/src/runtime/traceback.go
@@ -998,7 +998,7 @@ func topofstack(f funcInfo, g0 bool) bool {
// isSystemGoroutine reports whether the goroutine g must be omitted
// in stack dumps and deadlock detector. This is any goroutine that
// starts at a runtime.* entry point, except for runtime.main,
-// runtime.handleAsyncEvents (wasm only) and sometimes runtime.runfinq.
+// runtime.handleAsyncEvent (wasm only) and sometimes runtime.runfinq.
//
// If fixed is true, any goroutine that can vary between user and
// system (that is, the finalizer goroutine) is considered a user
@@ -1009,7 +1009,7 @@ func isSystemGoroutine(gp *g, fixed bool) bool {
if !f.valid() {
return false
}
- if f.funcID == funcID_runtime_main || f.funcID == funcID_handleAsyncEvents {
+ if f.funcID == funcID_runtime_main || f.funcID == funcID_handleAsyncEvent {
return false
}
if f.funcID == funcID_runfinq {