Add v0.2 surface syntax, writeback/subtask stdlib, and view input deferral.

Use + for parameters, ordered-list branches, backtick identifiers, and quoted strings with escapes. Add writeback and subtask host libs, optional parameter defaults, narrative-bold comment fix, and defer view execution until preset stdin is submitted.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-06 17:52:33 +08:00
1 parent 92d88fe761
commit 63e5be80ab
116 files changed
+2226 -559

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# 子任务标准库(subtask)
| | |
|---|---|
| 状态 | v1 已落地 |
| 库 | `lib/subtask.mq.md` · `lib/子任务.mq.md` |
## 定位
OS 进程式并发:`spawn` 另起 `marqdo run <path>` 子进程;**父进程结束(含 panic)时 KillOnDrop 终止所有未 join 的子进程**。
v1 不共享 Marqdo 堆;子任务通过 stdout / 文件 / 环境通信。
## API
| EN | ZH | 说明 |
|----|-----|------|
| `spawn` | `启动` | `path=`(`.mq.md`) |
| `poll` | `探测` | `id=` → status map |
| `wait` | `等待` | `id=` → exit code(避免与内置 `join` 冲突) |
| `kill` | `终止` | `id=` |
| `wait_all` | `等待全部` | 所有子进程 exit codes |
Host:`host_subtask_*`(`src/host/subtask.rs`)。