Closed primeare closed 2 years ago
The API was built by looking at existing modules and focussing on what they needed. We want to keep the API as small as feasible while covering the common use cases. SharedArrayBuffer not being available until more recently would not have been in the set of commonly used functions by modules.
Are you working on a native module where you need to create a SharedArrayBuffer? Today you could do it by calling into JavaScript, create it there and then return it to the native.
Closing since there has not been a response for quite some time. Please let us know if you think that was not the right thing to do.
There is no API for creating
SharedArrayBuffer
. As node.green says the support ofSharedArrayBuffer
was introduced since Node v9. I think this API was not introduced, because N-API has a backward compatibility with Node v8, where there is no support forSharedArrayBuffer
. Please, let me know what is the reason and whether this could be implemented.