{"id":"word--tunnel","name":"tunnel","owner":"yeho","package":"language","kind":"keyword","signature":"tunnel","description":"Carry a typed value between concurrent work","context":"Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.","parameters":[],"returns":"","members":[],"tags":["complete-program","concurrency","cpu","keyword","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"errors-tasks-effects-2026.1.json; tests/compiler/errors-tasks-effects/tunnel-handoff/start.yh"},"status":"experimental","notes":["The channel keyword was removed. Use tunnel.","Tunnels are capacity one, FIFO, and backpressured in the current contract."],"examples":[{"id":"complete","title":"Tunnel runtime","description":"Use a tunnel when producers and consumers should communicate without sharing an unbounded mutable queue.","code":"tunnel<int> scores\n\nscores.Send(13)\nwait until scores.hasValue\n\nConsole.Log(Text.From(scores.Receive()))\n\n\n","manifest":"package = \"tests.compiler.kyber.tunnelRuntime\"\nversion = \"0.1.0\"\nbackend = \"kyber\"\nosTarget = \"windows\"\narchTarget = \"x64\"\nselfContainedApp = false\n\n\n\n","tags":["cpu","complete-program"],"verification":"type checked","run":"cpu-oracle","source":"tests/compiler/kyber/tunnel-runtime/start.yh","sha256":"3c1fdce9c14ba97bb947fae217a6431f3afa73d362fdea16d47f39a67ae79bf7","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=word--tunnel","json":"https://demonhunterlabs.com/reference/items/word--tunnel.json","markdown":"https://demonhunterlabs.com/reference/text/word--tunnel.md"}
