skip to content
[readonly]

mesh-rt's node loop on CPU threads: claim published tickets, run init or task, complete them with results, marks, node records and traces

sh
$ sexc add @ajax/mesh-worker-node
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 02:57v/# 1 version
  • drwxr-xr-x-Oct 27 02:57files/# the files of 0.1.0
latest
0.1.0, published Oct 27 02:57 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-worker-ctx ^0.1.0, @ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi-control-block ^0.1.0, @ajax/mesh-abi-ring ^0.1.0, @ajax/mesh-abi-trace ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-abi-program-table ^0.1.0, @ajax/mesh-abi-node ^0.1.0, @ajax/mesh-check ^0.1.0
dependents
@ajax/mesh-inproc, @ajax/mesh-mps, @ajax/mesh-prog-gemm, @ajax/mesh-prog-pipesink, @ajax/mesh-prog-pipesrc-n, @ajax/mesh-worker
keywords
mesh alphaos worker native node-loop sdk
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-worker-node
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-worker-node
2
3mesh-rt's node loop on CPU threads: claim the next published ticket (E_SEQ acquire, then a CAS on P_RING_HEAD), run `init` (OP_INIT) or `task`, complete it (P_RESULTS, P_MARKS release, P_DONE, the node record, a trace record), heartbeat while idle with a backoff that spins first and sleeps longer the longer it waits, and halt at P_SHUTDOWN. `mesh_worker_run_nodes` runs a slot's PT_NODES nodes, a thread each.
4
5## Ported from
6
7[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT): crates/mesh-worker/src/lib.rs (`node_loop`, `run_nodes`, `idle`).
8
9## Tests
10
11`tests/node.c`: the Rust's `nodes_run_the_ring_like_mesh_rt` (4 nodes, 200 tickets, a bad op, results, counters, node records, traces), `faults_requests_and_peers` and `input_queue_pops_once_each`.
12
13## Licence
14
15MIT. See the repository's LICENSE.