I write a C source file, declare an external function by
extern "C" int say_hello(const char*, int);
So after compiling by `emcc`, I got
(import "env" "_say_hello" (func (;30;) (type 1)))
in the math.wast. Everything is ok for now. but I want to change the
module of _say_hello to another
Hi Nilesh -- I'm not familiar specifically with the WebSockets code, but in
general note that the JavaScript contexts for each thread are entirely
separate and there's no way to directly work with JS objects belonging to
one thread from another. If the WebSocket interface is opened and
If I try to register socket callback on the side thread, I get JS exception
mentioning Module['websocket'] is undefined. I've tried adding the code to
do FS.mount(SOCKFS, {}, null); explicitely from pthread_main.js. Even
though that help getting rid of the exception, I didn't see sockets
To describe more, here is the problem I'm working on -
The code have periodic processing logic in the main thread making it busy.
There are other threads in the native C++ code waiting for data to be
available on various sockets. To consume less CPU, I'm making these threads
wait on socket