Skip to content

Commit 746f49a

Browse files
committed
fix: hack some more iterations on the spin waiter
1 parent fd0055f commit 746f49a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/all/cli_tests/threads.wat

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@
1818
(drop (call $__wasi_thread_spawn (i32.const 0)))
1919
(drop (call $__wasi_thread_spawn (i32.const 0)))
2020

21-
;; Wasmtime has no `wait/notify` yet, so we just spin to allow the threads
22-
;; to do their work.
23-
(local.set $i (i32.const 2000000))
21+
;; Spin to allow the threads to do their work. TODO: replace this with
22+
;; a loop over `wait` with `notify` instructions in the
23+
;; `wasi_thread_start` entry point.
24+
(local.set $i (i32.const 4000000))
2425
(loop $again
2526
(local.set $i (i32.sub (local.get $i) (i32.const 1)))
2627
(br_if $again (i32.gt_s (local.get $i) (i32.const 0)))

0 commit comments

Comments
 (0)