From fc0a560e60d3e9a9b74696d02da14a747b4b34e7 Mon Sep 17 00:00:00 2001 From: dimgigov Date: Sun, 14 Jun 2026 17:50:40 +0300 Subject: [PATCH] docs(roadmap): mark concurrency done in selfhost Green threads (lib/Task.bux) and channels (lib/Channel.bux) already work. Verified by _test_green_threads and _test_forin_channel. --- docs/ROADMAP.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index fe50890..31bf006 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -247,14 +247,25 @@ const C: int = A + B; // Evaluated at compile time ## P2 — Nice to Have ### 11. Concurrency +**Status:** ✅ Done in selfhost. + **Why:** Go-style goroutines + channels, but without GC. **Syntax:** ```bux -let (tx, rx) = Channel::New(); -Task::Spawn(Worker, rx); +import Std::Task; +import Std::Channel; + +let ch: Channel = Channel_New(3); +Task_Spawn(Worker as *void, (&ch) as *void); +Channel_SendInt(&ch, 42); ``` +**Notes:** +- Runtime support in `rt/runtime.c`: `bux_task_*` and `bux_channel_*`. +- Stdlib wrappers: `lib/Task.bux`, `lib/Channel.bux`. +- `for msg in ch` iterator lowering works in selfhost. + --- ## Recommended Order @@ -274,4 +285,4 @@ Task::Spawn(Worker, rx); 13. ✅ **Selfhost bootstrap loop** — Done 14. ✅ **Destructors / Drop** — Done in selfhost. 15. ✅ **Bounds checking on slices** — `Slice` with bounds-checked indexing works in selfhost via `lib/Slice.bux`. -16. **Concurrency** — Green threads + channels. +16. ✅ **Concurrency** — Green threads + channels work in selfhost.