phase: 20.49 COMPLETE; 20.50 Flow+String minimal reps; 20.51 selfhost v0/v1 minimal (Option A/B); hv1-inline binop/unop/copy; docs + run_all + CURRENT_TASK -> 21.0
This commit is contained in:
16
apps/tests/async-nowait-basic/main.hako
Normal file
16
apps/tests/async-nowait-basic/main.hako
Normal file
@ -0,0 +1,16 @@
|
||||
// @env NYASH_AWAIT_MAX_MS=5000
|
||||
// Simple nowait/await test under Interpreter
|
||||
|
||||
static box Main {
|
||||
main() {
|
||||
// spawn two async computations
|
||||
nowait fa = 10 + 20
|
||||
nowait fb = 1 + 2
|
||||
|
||||
// wait and combine
|
||||
a = await fa
|
||||
b = await fb
|
||||
return a + b // 33
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user