32 ms·
Nice, but: 1. It is exposed as a nodejs module, but some other modules may be at conflict because they may wrongly assume that they are the only thread running
by amelius 9y ago
Nice, but:
1. It is exposed as a nodejs module, but some other modules may be at conflict because they may wrongly assume that they are the only thread running. E.g., some modules may be using global variables in C++.
2. Still, it doesn't support fast immutable communication (structural sharing) to other threads through shared memory.
- MuffinFlavored 9y agoWhat would it take to get number two to become a reality? Some sort of special module? This is the one main drawback I've found doing "production stuff" with Node. Does Java offer cross-thread shared memory? Go, Haskell, Python, etc.?
- cjalmeida 9y agoJava does shared memory by default and even has concurrency related concepts as fundamentals of the language (Object.wait(), etc.) . Python supports threading but is not very useful due to the infamous GIL. However, multiprocessing is usually a decent alternative and it supports shared memory on forking (copy on write, though). Also you can use mmap easily for IPC.