pipesrc-n, the pipe demo's source as a native mesh worker: msgs into pipehash or digests straight to a sink, with backpressure
$ sexc add @ajax/mesh-prog-pipesrc-n- total 3
- drwxr-xr-x-../
- drwxr-xr-x-Oct 27 03:26v/# 1 version
- drwxr-xr-x-Oct 27 03:26files/# the files of 0.1.0
- latest
- 0.1.0, published Oct 27 03:26 by ajax
- owners
- ajax
- license
- MIT
- dependencies
- @ajax/mesh-worker ^0.1.0, @ajax/mesh-worker-ctx ^0.1.0, @ajax/mesh-worker-node ^0.1.0, @ajax/mesh-mailbox ^0.1.0, @ajax/mesh-abi-view-pipedemo ^0.1.0, @ajax/mesh-abi-ops ^0.1.0, @ajax/mesh-abi-pipe ^0.1.0, @ajax/mesh-check ^0.1.0
- dependents
- none yet
- keywords
- mesh alphaos native worker program
- homepage
- https://github.com/thomasdavis/alpha-c-mesh/tree/main/programs/pipesrc-n
- repository
- https://github.com/thomasdavis/alpha-c-mesh
1# @ajax/mesh-prog-pipesrc-n 2 3The pipe demo's CPU source, a native worker program (programs/pipesrc's twin): mode 0 pushes `msg`s 4into pipehash's inbox, mode 1 hashes them itself and pushes `digest`s into a sink; a full pipe ends the 5task (backpressure), no consumer counts as gone. 6 7- **Ported from:** alpha-rust-mesh `programs/pipesrc-n/src/main.rs`. 8- **Tests:** on @ajax/mesh-worker-node's loop: msgs in seq order on pipehash's inbox, backpressure, gone 9 without a sink, digests into a sink, and the ops.