Files
hakorune/apps/tests/async-await-timeout-fixed/main.hako

14 lines
264 B
Plaintext

// Async await timeout smoke (fixed API)
// Expects await to time out and return Result.Err("Timeout")
// @env NYASH_AWAIT_MAX_MS=100
static box Main {
main() {
fut = env.future.delay(500)
res = await fut
print(res.toString())
return res
}
}