From 2686e7494845dae877e0efb4ff786c672b2cd2ef Mon Sep 17 00:00:00 2001 From: Richard Musiol Date: Thu, 10 Oct 2019 22:38:26 +0200 Subject: 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 TryBot-Result: Gobot Gobot Reviewed-by: Cherry Zhang --- src/cmd/internal/objabi/funcid.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cmd') diff --git a/src/cmd/internal/objabi/funcid.go b/src/cmd/internal/objabi/funcid.go index fe54eba663..c13c3cb458 100644 --- a/src/cmd/internal/objabi/funcid.go +++ b/src/cmd/internal/objabi/funcid.go @@ -37,7 +37,7 @@ const ( FuncID_debugCallV1 FuncID_gopanic FuncID_panicwrap - FuncID_handleAsyncEvents + FuncID_handleAsyncEvent FuncID_wrapper // any autogenerated code (hash/eq algorithms, method wrappers, etc.) ) @@ -83,8 +83,8 @@ func GetFuncID(name, file string) FuncID { return FuncID_gopanic case "runtime.panicwrap": return FuncID_panicwrap - case "runtime.handleAsyncEvents": - return FuncID_handleAsyncEvents + case "runtime.handleAsyncEvent": + return FuncID_handleAsyncEvent } if file == "" { return FuncID_wrapper -- cgit v1.3