language.types · type ·
task
A handle to delayed work with completion and failure state.
A focused reference with a complete example. Numeric widths and experimental types still depend on the selected backend.
taskStatus: documented
Task cleanup
Use a task when useful work can progress independently and you can define completion, failure, cancellation, and ownership.
cpu · complete-program · type checked
FinishDuringShutdown()
{
wait 10ms
Console.Log("cleanup-complete")
}
task cleanupTask = task FinishDuringShutdown()
project.mech
package = "tests.compiler.errorsTasksEffects.taskCleanup"
version = "0.1.0"
backend = "cpu-oracle"
osTarget = "windows"
archTarget = "x64"
selfContainedApp = false
Notes and source
demonhunterlabs/app/lib/yeho-language-reference.ts