(module $example (type $func (;0;) (func)) (type $cont (;1;) (cont $func)) (type (;2;) (func (param (ref $cont)))) (type (;3;) (func (param i32))) (import "lwt" "yield" (tag $yield (;0;) (type $func))) (import "lwt" "fork" (tag $fork (;1;) (type 2) (param (ref $cont)))) (import "spectest" "print_i32" (func $log (;0;) (type 3))) (export "main" (func $main)) (elem (;0;) declare func $thread1 $thread2 $thread3) (func $main (;1;) (type $func) i32.const 0 call $log ref.func $thread1 cont.new $cont suspend $fork i32.const 1 call $log ref.func $thread2 cont.new $cont suspend $fork i32.const 2 call $log ref.func $thread3 cont.new $cont suspend $fork i32.const 3 call $log ) (func $thread1 (;2;) (type $func) i32.const 10 call $log suspend $yield i32.const 11 call $log suspend $yield i32.const 12 call $log ) (func $thread2 (;3;) (type $func) i32.const 20 call $log suspend $yield i32.const 21 call $log suspend $yield i32.const 22 call $log ) (func $thread3 (;4;) (type $func) i32.const 30 call $log suspend $yield i32.const 31 call $log suspend $yield i32.const 32 call $log ) )