|
30 | 30 |
|
31 | 31 | (core module $m |
32 | 32 | (import "" "thread.new-indirect" (func $thread.new-indirect (param i32 i32) (result i32))) |
33 | | - (import "" "thread.yield-to-suspended" (func $thread.yield-to-suspended (param i32) (result i32))) |
| 33 | + (import "" "thread.yield-then-resume" (func $thread.yield-then-resume (param i32) (result i32))) |
34 | 34 | (import "" "waitable-set.new" (func $waitable-set.new (result i32))) |
35 | 35 | (import "" "waitable.join" (func $waitable.join (param i32 i32))) |
36 | 36 | (import "" "subtask.cancel-sync" (func $subtask.cancel-sync (param i32) (result i32))) |
|
64 | 64 | (i32.wrap_i64 (i64.shr_u (call $stream.new) (i64.const 32))) |
65 | 65 | ) |
66 | 66 | (func $spawn-and-yield (param $idx i32) (param $arg i32) |
67 | | - (drop (call $thread.yield-to-suspended |
| 67 | + (drop (call $thread.yield-then-resume |
68 | 68 | (call $thread.new-indirect (local.get $idx) (local.get $arg)))) |
69 | 69 | ) |
70 | 70 | (func $assert-blocked (param $ret i32) |
|
197 | 197 | (alias core export $memTable "ftbl" (core table $ftbl)) |
198 | 198 |
|
199 | 199 | (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (table $ftbl))) |
200 | | - (core func $thread.yield-to-suspended (canon thread.yield-to-suspended)) |
| 200 | + (core func $thread.yield-then-resume (canon thread.yield-then-resume)) |
201 | 201 | (core func $waitable-set.new (canon waitable-set.new)) |
202 | 202 | (core func $waitable.join (canon waitable.join)) |
203 | 203 | (core func $subtask.cancel-sync (canon subtask.cancel)) |
|
222 | 222 | (core instance $m (instantiate $m |
223 | 223 | (with "" (instance |
224 | 224 | (export "thread.new-indirect" (func $thread.new-indirect)) |
225 | | - (export "thread.yield-to-suspended" (func $thread.yield-to-suspended)) |
| 225 | + (export "thread.yield-then-resume" (func $thread.yield-then-resume)) |
226 | 226 | (export "waitable-set.new" (func $waitable-set.new)) |
227 | 227 | (export "waitable.join" (func $waitable.join)) |
228 | 228 | (export "subtask.cancel-sync" (func $subtask.cancel-sync)) |
|
0 commit comments