language.types · type ·

task of T

A handle to delayed work that produces a value of type T.

containers-and-handlescpulanguagetypeyeho

A focused reference with a complete example. Numeric widths and experimental types still depend on the selected backend.

task of T

Status: documented

Complete tasks and delayed work example

Use a task when useful work can progress independently and you can define completion, failure, cancellation, and ownership.

cpu · language · type checked

Score() -> int { return 40 + 2 }
task of int job = task Score()
wait job
if job.failed { Console.Error(job.error.message) }
else { Console.Log(Text.From(job.result)) }
project.mech
manifestVersion = "2"
package = "api.example.language__tasks"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

demonhunterlabs/app/lib/yeho-language-reference.ts