Message channel becomes a performance bottleneck under heavy messages rate. See #767.
Shared array buffer can act as a shared memory for worker-threads but is not friendly to manipulate.
Cluster worker does not offer a similar feature.
To implement it right, an encapsulation needs to be done exposing the same high-level API at the pool level:
class Shm {
get(key)
set(key, value)
delete(key)
}
The set/get ops can be thread-safe or not (use atomics or mutex or semaphore), depending on the use case requirements
Pool expose a public property to access it
Task functions can import and use it to share structured-cloneable writable data?
Message channel becomes a performance bottleneck under heavy messages rate. See #767.
Shared array buffer can act as a shared memory for
worker-threadsbut is not friendly to manipulate.Cluster worker does not offer a similar feature.
To implement it right, an encapsulation needs to be done exposing the same high-level API at the pool level:
The set/get ops can be thread-safe or not (use atomics or mutex or semaphore), depending on the use case requirements
Pool expose a public property to access it
Task functions can import and use it to share structured-cloneable writable data?