Reputation: 2405
It appears shared memory and atomics was added in Node 9.0.0: http://node.green/#ES2017-features-shared-memory-and-atomics-Atomics-add
I'm trying to find the official documentation but can't seem to locate it at: https://nodejs.org/api/index.html
Anyone know where it might be located?
Upvotes: 3
Views: 2860
Reputation: 1227
Here you can find a Node.js + AssemblyScript multithreading boilerplate code.
worker_threads
WebAssembly
multithreading with AssemblyScript
WebAssembly
memory allocatorUpvotes: 0
Reputation: 2405
EVOLVING ANSWER
It appears that Node 9.0.0 supports SharedArrayBuffer
which can be found on MDN at: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer
and atomics
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/store
This was added to Node.js in v9.0.0: http://node.green/#ES2017-features-shared-memory-and-atomics-SharedArrayBuffer
I will continue to document everything I learn on this for others who are interested in utilizing this in Node.js.
YouTube Videos Nidin Vinayakan: Shared Memory & Parallel Programming with JavaScript | JSConf EU 2017 https://www.youtube.com/watch?v=vvqfmskTIjE
Upvotes: 4