refactor coroutine lowering and tasks

This commit is contained in:
Jaden Weiss
2020-01-03 00:23:37 -05:00
committed by Ayke
parent 2521cacb51
commit 6a50f25a48
40 changed files with 1830 additions and 1515 deletions
+5 -2
View File
@@ -21,7 +21,8 @@ func fd_write(id uint32, iovs *wasiIOVec, iovs_len uint, nwritten *uint) (errno
//export _start
func _start() {
initAll()
callMain()
go callMain()
scheduler()
}
// Using global variables to avoid heap allocation.
@@ -50,7 +51,9 @@ func setEventHandler(fn func()) {
//go:export resume
func resume() {
handleEvent()
go func() {
handleEvent()
}()
}
//go:export go_scheduler