language · language ·

Wait, stop, and parallel

wait can pause for a duration, frame, task, or condition. stop requests cancellation, and parallel scopes concurrent branches.

concurrencycpuframeslanguagenextFrameparallelstopuntilwaityeho

Use the narrowest wait that explains progress. Treat stop as a lifecycle request, not proof that cleanup already finished.

wait 100ms
wait 1s
wait nextFrame
wait 2 frames
wait taskName
wait until condition
stop taskName
parallel { ... }

Status: experimental

Complete program

Coordinate CPU tasks explicitly. Cancellation is a request; a short task may finish first.

cpu · language · type checked

// task is the supported CPU concurrency unit; thread syntax is unavailable.
Count() -> int { return 42 }
task of int worker = task Count()
stop worker
wait until worker.finished
Console.Log(Text.From(worker.cancelled))
parallel
{
    Console.Log("Preparing textures")
    Console.Log("Preparing audio")
}
project.mech
manifestVersion = "2"
package = "api.example.language__wait_stop_parallel"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"
Notes and source

Supported duration units are target-validated.

parallel failure and cleanup semantics are covered by dedicated fixtures, but the feature is experimental.

yeho/parser_statements.cpp parseWaitStatement; errors-tasks-effects fixtures