mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 21:43:40 +00:00
runtime: remove minSched hack for wasm
I am not entirely sure what it's doing (it seems related to js.FuncOf), but tests still seem to pass when this code is removed. So let's remove it.
This commit is contained in:
committed by
Ron Evans
parent
cd2bb8333d
commit
2f9e39e21c
@@ -247,24 +247,6 @@ func scheduler(returnAtDeadlock bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// This horrible hack exists to make WASM work properly.
|
||||
// When a WASM program calls into JS which calls back into WASM, the event with which we called back in needs to be handled before returning.
|
||||
// Thus there are two copies of the scheduler running at once.
|
||||
// This is a reduced version of the scheduler which does not deal with the timer queue (that is a problem for the outer scheduler).
|
||||
func minSched() {
|
||||
scheduleLog("start nested scheduler")
|
||||
for !schedulerDone {
|
||||
t := runqueue.Pop()
|
||||
if t == nil {
|
||||
break
|
||||
}
|
||||
|
||||
scheduleLogTask(" run:", t)
|
||||
t.Resume()
|
||||
}
|
||||
scheduleLog("stop nested scheduler")
|
||||
}
|
||||
|
||||
func Gosched() {
|
||||
runqueue.Push(task.Current())
|
||||
task.Pause()
|
||||
|
||||
Reference in New Issue
Block a user