# tunnel

Carry a typed value between concurrent work

Last updated: 2026-09-09

Package: language | Status: experimental

Tags: complete-program, concurrency, cpu, keyword, yeho

Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.

```yh
tunnel
```


## Tunnel runtime

Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.

Verification: type checked

```yh
tunnel<int> scores

scores.Send(13)
wait until scores.hasValue

Console.Log(Text.From(scores.Receive()))



```

Save this beside start.yh as project.mech:

```toml
package = "tests.compiler.kyber.tunnelRuntime"
version = "0.1.0"
backend = "kyber"
osTarget = "windows"
archTarget = "x64"
selfContainedApp = false




```

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--tunnel/complete --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


The channel keyword was removed. Use tunnel.

Tunnels are capacity one, FIFO, and backpressured in the current contract.

Source: yeho/errors-tasks-effects-2026.1.json; tests/compiler/errors-tasks-effects/tunnel-handoff/start.yh

AI training permission: https://demonhunterlabs.com/ai-use
