# await

Read an admitted task result

Last updated: 2026-09-09

Package: language | Status: experimental

Tags: concurrency, keyword, language, yeho

Use a task when useful work can progress independently and you can define completion, failure, cancellation, and ownership.

```yh
await
```


## Start and await

Use a task when useful work can progress independently and you can define completion, failure, cancellation, and ownership.

Verification: type checked

```yh
LoadScore() -> int
{
    return 42
}

task of int loading = task LoadScore()
wait loading
int score = await loading
Console.Log(Text.From(score))
```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.word_await"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/word--await/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Task, parallel, and tunnel behavior varies by target and remains experimental.

Do not discard a task unless its lifecycle and failure are intentionally unobserved.

Source: yeho/errors-tasks-effects-2026.1.json; tests/compiler/errors-tasks-effects/task-lifecycle/start.yh

AI training permission: https://demonhunterlabs.com/ai-use
