emscripten_async_resume is used in asyncify - the emterpreter, which I recommended, is a different approach. Look for EMTERPRETIFY_ASYNC in src/*.js.
On Tue, Aug 25, 2015 at 3:46 AM, Michael Sanders <[email protected]> wrote: > > Hi Alon, > I have made some test, in the end there are some compilation issue. > > *From C:* > *int someFunction (){* > *return 0;* > *}* > *int main() {* > * printf("NodeJS is started\n");* > * usleep(5, someFunction);* > * printf("NodeJS finished\n");* > > > *}* > > > > > > > > *Then i Patched library_pthread_stub.js: usleep: function(useconds, f) { > console.log("*** USLEEP CALLED *** ", typeof(asm)); > asm.setAsync(); f(_emscripten_async_resume); console.log("*** > USLEEP CALLED RETURNED *** "); return 0; }and I also patched > unistd.h:int usleep(unsigned, (*f)(int));* > > But the compiler give me a lot of error. > > M. > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
