language · keyword ·
tunnel
Carry a typed value between concurrent work
Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.
tunnelStatus: experimental
Tunnel runtime
Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.
cpu · complete-program · type checked
tunnel<int> scores
scores.Send(13)
wait until scores.hasValue
Console.Log(Text.From(scores.Receive()))
project.mech
package = "tests.compiler.kyber.tunnelRuntime"
version = "0.1.0"
backend = "kyber"
osTarget = "windows"
archTarget = "x64"
selfContainedApp = false
Notes and source
The channel keyword was removed. Use tunnel.
Tunnels are capacity one, FIFO, and backpressured in the current contract.
yeho/errors-tasks-effects-2026.1.json; tests/compiler/errors-tasks-effects/tunnel-handoff/start.yh