skip to content
==> README.md <==
1# @ajax/mesh-test-worker
2
3The native lifecycle fixture: a mesh worker program whose ops do what lifecycle tests need. Op 0:
4`arg * 3 + 7 + 1000 * param` (two images tell apart); OP_INIT: the view magic `NNTW`; 3: sleep
5`arg` ms; 4: param; 5: the pid; 9: panic; 10: allocate and touch `arg` MiB (a memory cap kills it);
611: read past the view (a fault); 12: spin `arg` ms; 13: SIGTERM itself if `arg` is 0, else
7`exit(arg)`, mid-task. Its setup sleeps `MESH_TEST_SETUP_MS` (a slow model load).
8
9## Ported from
10
11[alpha-rust-mesh](https://github.com/rsafier/alpha-rust-mesh) (Richard Safier, MIT):
12crates/mesh-worker/src/bin/test_worker.rs.
13
14## Tests
15
16It is the subject of @ajax/mesh-native's lifecycle tests.
17
18## Licence
19
20MIT. See the repository's LICENSE.