Repository navigation
docs: distinguish IO forks from CPU parallel calls - #1415
Conversation
…llel calls (linked), with no aside mid-sentence Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Thanks @oxura for tracking this down, and @Lorenzobattistela for the rewrite! I pushed one small commit on top (df25e1a) before merging. The sentence now reads:
Why:
|
|
Thanks @nicolas-abril and @Lorenzobattistela for the final wording and merge. The distinction between interleaving pure work and concurrent socket/timer progress is clearer, and I’ll keep the maintainer-authored guide boundary in mind. No further outside guide rewrite from me. |
|
We'll be happy to take suggestions from you. This was a good improvement in the end, even if I didn't take your wording directly. |
|
Thanks @nicolas-abril — understood. I’m happy to send focused suggestions or concrete correctness findings while leaving the final guide wording to you. Glad this improvement landed. |
Closes #1375.
Clarify the intended current policy rather than changing the IO scheduler:
IO.forkstarts an IO computation and returns its result channel, not an automatic CPU-parallel job.IO.join, channel primitives, deadline/loser behavior and deadlock documentation intact.Evidence
The native source matches this policy:
IO.forkwrapsIO.spawn, the spawn primitive queues anIoWork, andio_loopcallsio_stepon the event-loop environment.io_stepsynchronously evaluates the continuation before handling its next effect.Compiled and ran the reporter's unchanged 4,000,000,000-iteration, clock-seeded workloads on Linux with clang 22.1.8 and
--gpu off:IO.forkjobsEvery run exited 0. Both forked/sequential workloads produced four job results and the correct U32 sum of those results. These measurements are local evidence, not a permanent timing test or a performance guarantee.
bun bend2/main.ts guideexposes the new distinction.bun gates/repo.ts: PASS 50 / 50.No runtime/backend changes; no wording-only or noisy timing tests added. The unavailable mini-cluster gates were not run.