Files
marqdo/public/stdlib/subtask.mq.md
T
cflmyandCursor 2e65c055b8 Release v0.1.2: embedded stdlib, docs, and extension branch policy.
Embed lib/*.mq.md in binary; marqdo version --check; public writeback/subtask pages; restore /vscode-extension/ ignore. VSIX built from branch vscode-extension only (see doc/design/vscode-extension-commit.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 09:41:53 +08:00

21 lines
650 B
Markdown

---
title: lib/subtask — concurrent tasks
description: Spawn file, function, or foreign code in parallel
> lib/subtask.mq.md
---
# main
`spawn` picks **one** mode (others default to `None`):
| Argument | Runs | `wait` returns |
|----------|------|----------------|
| `path=` | `marqdo run` child process | exit code |
| `fn=` + optional `args=` | function in a thread (entry module) | return value |
| `code=` | foreign ``` fence ``` subprocess | stdout text |
| `lang=` + `source=` | foreign source subprocess | stdout text |
Also: `poll id=`, `kill id=`, `wait_all`. Parent exit kills file/foreign children.
> print text=subtask overview ok