A thread-safe implementation of nodejs worker threads with Mutex locking implemented using Atomics & SharedArrayBuffer(s).
Clone the repository and run
This will run the node process only once.
npm start
To run the benchmark, run. Will invoke the single process multiple times, concurrently.
npm bench
This will create multiple output-<n>.txt
files along with a final concatenated output.txt
file.
The combined output.txt
should contain 5000 entries all having the same final value of 130.