ludic/docs/language/structure
Orkuncakilkaya c10abd9f9f feat(jobs): real OS threads - Job.parallel_for, fn name, thread-safe Sync
- `fn name` names a top-level function as a value (E_FNREF, lowers to @fn_<name>); the worker
  entry point for Job.parallel_for, which checks it takes (int, pointer-like) and returns void.
- runtime/native/threads.ll (pthreads) and threads_win.ll (Win32 SRWLOCK/CONDITION_VARIABLE): a
  pool of one worker per core but one, parked between batches; every thread claims chunks by
  compare-and-swap. Linked only into programs that use Job/Promise/Sync, by `ludicc -o`,
  `ludic build` and the test suite's build helper.
- Sync.* is real: native mutexes, atomics as cmpxchg retry loops (neither clang takes atomicrw,
  the PC's rejects seq_consistent), mutex-guarded channels, Sync.cpu_count from the OS.
- spawn/despawn on a pool thread stop the program with a located panic.
- examples/library/threads.ludic and its test; docs for fn, Job.parallel_for, Job.is_worker.
- Reseeded (bootstrap-cfree: out.ll == seed.ll). 141/141 on macOS; jobs, threads and the guard
  pass on Windows from the reseeded Windows seed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:52:22 +03:00
..
_section.md docs: automated documentation pipeline (per-symbol source → pages) 2026-08-29 16:25:54 +03:00
kw-const.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-entry.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
kw-enum.md feat(types): tagged-union enums — variant payloads + binding match + exhaustiveness (#56) 2026-09-01 03:07:46 +03:00
kw-extern.md refactor(lang): rename builtins flr->floor and fx->fixed 2026-08-30 02:01:56 +03:00
kw-fn.md feat(jobs): real OS threads - Job.parallel_for, fn name, thread-safe Sync 2026-09-15 13:52:22 +03:00
kw-function.md refactor(lang): rename the fn keyword to function 2026-08-30 01:43:22 +03:00
kw-handler.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-import.md feat(lang): new Type { field: value } record initialisers 2026-08-31 01:20:06 +03:00
kw-let.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-model.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-namespace.md feat(lang): #76 namespace block form with export/internal visibility 2026-09-02 08:14:54 +03:00
kw-new.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
kw-phase.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-prefab.md feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
kw-program.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-property.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
kw-public.md feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
kw-return.md refactor(lang): rename the fn keyword to function 2026-08-30 01:43:22 +03:00
kw-ui.md feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
kw-var.md docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00