decisions SUPERSEDED

105. std::thread::spawn stays declined, until a customer needs it

calef, 2026-08-22, on a milestone 64 (enough std to run somebody else's crate) lane's write-up (notes/thread-spawn-fork.md, pull request #394): option C, decline. "I don't know of a customer for A yet. We will likely do A when there is such a customer."

The question

Milestone 64's rank-3 gap: std::thread::spawn returns Unsupported on nife unconditionally (patches/std-nife/overlay/std/src/sys/thread/nife.rs), not because anything is missing but because Tcb::CONFIGURE consumes the address-space capability it binds and kernel/src/thread.rs owns that AddressSpace outright for automatic teardown. No two TCBs can share one address space today; that is the existing contract, not an oversight. rayon, crossbeam-channel, tokio and ignore all compile and link against the PAL already: nothing is blocked on code, everything was blocked on whether nife should build real shared-memory threads at all, and if so, how.

The lane costed three options rather than building any of them, per this project's rule that the system call surface is calef's call:

The decision

Option C. No customer for real shared-memory threads exists today. The only cited want is milestone 149's Rayon-parallel NPB-Rust variants, and the lane's own note is honest that this is "useful evidence, not a paying workload." Nothing on the customer path (milestone 54/55) needs shared-memory threading; that work is IPC-and-process-shaped already, which nife fully supports.

This is the move fast on what can be undone; be methodical on what cannot tenet applied directly: A is the irreversible, hard-to-undo option, being weighed against zero current demand. Declining now costs nothing and forecloses nothing. When a real consumer needs shared-memory std::thread::spawn, build A: it is seL4-precedented, and notes/thread-spawn-fork.md is the costing to start from.

What this does not decide. It does not rule out Option A forever, and it does not pick between A and B as a matter of principle if the calculus changes; it says today's answer is "no customer, so no cost paid yet." Milestone 149's Rayon-parallel variants stay permanently out of scope rather than pending, recorded where a reader meets that milestone.

What it unblocks

Milestone 64 can now record thread::spawn as a closed scope decision (a BUGS/scope-note entry, not an open gap) rather than a still-open rank in its worklist. Milestone 149's roadmap row already names the dependency correctly ("the Rayon-parallel variants gate on milestone 64's still-open thread::spawn fork"); that gate is now answered as out of scope for now, not resolved into a build.

Amendment (2026-10-07): reopened, and option A is milestone 812

The trigger this section named has fired. calef, ruling fork 5 of pull request #1803 on 2026-10-07 (UTC), refused read-only ZFS: "Read only isn't interesting to me. Read write is the point." The only realistic read-write ZFS is OpenZFS's own libzpool, which takes its threads from pthreads. Asked whether that reopens this section: "Yes. However read-write ZFS just isn't the current priority."

So option A is minted as milestone 812 (std::thread::spawn runs real threads in one address space), not yet scheduled. Several wants now share it: read-write ZFS through libzpool, Linux's btrfs through LKL, the tough TUF client, ripgrep's parallel walk, and parallel rustc and cargo for milestone 173 (rustc/cargo/LLVM natively on nife). The system-call-surface change in option A still owes its own section, ruled before code. The evidence is in notes/filesystem-crates-2026-10-07.md.

Superseded (2026-10-08): threads are built

calef, 2026-10-08 (UTC): "We should do threads. We deferred them because we didn't have a use. Now we've backed up uses." §263 (threads are built) records the ruling and the uses, and milestone 812 is now scheduled. Read this section for the costing and the history; §263 is the rule.