Threading: cpu topology, worker lanes and parallel for #3

Open
ilusha wants to merge 3 commits from threading into master

3 commits

Author SHA1 Message Date
40a3535393 Threading: parallel for over a fixed worker pool
Some checks are pending
Windows / build (pull_request) Waiting to run
CMake on a single platform / build (pull_request) Waiting to run
CMake / build (pull_request) Waiting to run
ParallelFor runs a counted loop across a fixed set of threads created up front
and hands out indices from an atomic counter, so the calling thread shares the
work. A thread-start hook runs once per helper thread.
2026-10-27 01:16:31 +03:00
e9b7004549 Threading: queue jobs in one lane per worker thread
WorkerLanes keeps one job queue per lane, runs each lane on its own thread and
can pause every lane to drain the queues on the calling thread. A thread-start
hook lets a caller run code once per lane (pin it, name it) without the queue
knowing why.
2026-10-27 01:16:31 +03:00
15b18a8f1f Threading: cpu topology and thread pinning
ThreadPinning reads the sibling groups from the kernel topology and pins the
calling thread to a cpu set. It is stateless and per-thread: a caller reads the
groups, picks the cpus for a thread and pins it, so any mapping of threads to
cpus is expressible.
2026-10-27 01:16:26 +03:00