-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pthreads support in node environemnt #6332
Comments
Pthread support is currently built on top of web workers and SharedArrayBuffer. As far as I know, nodejs does not support SharedArrayBuffer, or any other mechanism to share memory. Do you know if I'm wrong about that, or if it's on the roadmap? |
@dschuff Nodejs 9x supports atomics and SharedArrayBuffer by default, workers even longer. ps. workers would be in node the cluster api to be accurate. |
WebAssembly/binaryen#1419 is related, depending upon whether or not one uses USE_PTHREAD=1 or USE_PTHREAD=2 Tested on Chrome Version 66.0.3359.181 (Official Build) (64-bit) OSX 10.13.4 (17E202) with SharedArrayBuffers enabled. |
Closing as this appears to be the same as #6567 and there is more discussion there. |
I see that a comment on pthread issue has been removed so I will describe what I'm struggling with
So I'm compiling with this command
when running this output I get
what's happening is that the buffer given to the Uint32Array is not of type SharedArrayBuffer, so when ensureing that
I'm welcomed with another error
I'm running on node v9.6.1, emsdk incoming compiled yesterday
add that this all works great then -s USE_PTHREADS=1 is not present. I'm hopeful to see pthread support available in coming days/weeks.
The text was updated successfully, but these errors were encountered: