code wiki / (root) / nx_poolheavy.nx

nx_poolheavy.nx

buildroot/runtime/nx_poolheavy.nx

895 B28 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

compute-heavy nx_thread_pool demo: 4 tasks x 400M-iter LCG, 4 workers. Probe should read ~4 cores -- proving the (atomics-unblocked) lock-free thread_pool delivers real multi-core.

dependencies 1 imports · 0 importers

nx_thread_pool.nx nx_poolheavy.nx

imports: nx_thread_pool.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_pool_new nx_hw_worker_count nx_hw_cpu_count sys_mmap sys_munmap sys_mmap ↻ nx_chan_new sys_mmap ↻ _nx_chan_cell sys_thread_create nx_thread_spawn sys_mmap ↻ nx_thread_spawn_fn sys_mmap ↻ nx_pool_submit nx_atom_faa_i64 nx_chan_send nx_chan_try_send _nx_chan_cell ↻ nx_thread_yield _pool_futex_wake_all sys_futex_wake nx_pool_wait nx_atom_load_i64 nx_thread_yield ↻ nx_atom_store_i64 _pool_futex_wait sys_futex_wait nx_pool_shutdown nx_atom_faa_i64 ↻ nx_chan_send ↻ _pool_futex_wake_all ↻ nx_atom_load_i64 ↻ nx_thread_yield ↻

structs

none

consts

4const K_MAGIC_400000000: i64 = 400000000
5const K_MAGIC_1103515245: i64 = 1103515245
6const K_MAGIC_12345: i64 = 12345
7const K_MAGIC_2147483647: i64 = 2147483647

functions

11func heavy_task(ctx: i64) -> i64
19func main() -> i64