Skip to content

thread-safe node workers with mutex using Atomics & SharedArrayBuffers

License

Notifications You must be signed in to change notification settings

detj/thread-safe-workers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js CI

thread safe workers

A thread-safe implementation of nodejs worker threads with Mutex locking implemented using Atomics & SharedArrayBuffer(s).

Run

Clone the repository and run

One time

This will run the node process only once.

npm start

Multipe times

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.

Results

The combined output.txt should contain 5000 entries all having the same final value of 130.

See also

deno-workers

About

thread-safe node workers with mutex using Atomics & SharedArrayBuffers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published