3 ms·
Can we have immutable datastructures in a multithreaded NodeJs please? It is simple to implement (because immutable), and would solve a lot of problems. NodeJS
by amelius 11y ago
Can we have immutable datastructures in a multithreaded NodeJs please? It is simple to implement (because immutable), and would solve a lot of problems.
NodeJS works nicely with nonblocking IO, except what most people seem to forget is that the CPU is a resource too, which is still being blocked by NodeJS when handling any event. Multithreading would help alleviate this.
- s986s 11y agoYou can do this with child processes or you can help with this issue https://github.com/nodejs/node/pull/2133 https://github.com/nodejs/node/pull/2133
- amelius 11y agoChild processes don't allow "structural sharing" (unless using complicated shared-memory techniques, which have their limitations). ("Structural sharing" is a technique to make immutable data structures more efficient in time and space).