aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2019-04-10 17:18:22 -0700
committerIan Lance Taylor <iant@golang.org>2019-10-21 21:43:41 +0000
commit10e7bc994f47a71472c49f84ab782fdfe44bf22e (patch)
tree8fb31abeb0a149b339d10134e7f6ac6c230a4635 /src/runtime/proc.go
parent7c3060e92377a6833fa1c1e4d8e1dc996244af38 (diff)
downloadgo-10e7bc994f47a71472c49f84ab782fdfe44bf22e.tar.xz
runtime: add wasm support for timers on P's
When we put timers on P's, the wasm code will not be able to rely on the timer goroutine. Use the beforeIdle hook to schedule a wakeup. Updates #6239 Updates #27707 Change-Id: Idf6309944778b8c3d7178f5d09431940843ea233 Reviewed-on: https://go-review.googlesource.com/c/go/+/171827 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 71e756b991..fd93a3db5f 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -2355,7 +2355,7 @@ stop:
// wasm only:
// If a callback returned and no other goroutine is awake,
// then pause execution until a callback was triggered.
- if beforeIdle() {
+ if beforeIdle(delta) {
// At least one goroutine got woken.
goto top
}