Interesting, so this can use pthreads from the main thread ok, but not when starting from a pthread?
That is a less-tested use case, so it's possible you've run into a bug. Building with -s PTHREADS_DEBUG may help with extra logging. But it may be best to try to reduce this to a small testcase, as it may need to be debugged in depth. On Thu, Jul 23, 2020 at 7:46 AM Segmentation Fault Error < [email protected]> wrote: > Hello everyone, > > > > I have been using for a while emscripten to compile a large library. Since > its operations take long time, I moved the module to a web worker, where I > can call functions without blocking the UI. And it has worked fantastic so > far! > > > > To further improve performance, I then enabled pthreads in the toolchain. > I noticed then that the execution got stuck. Somehow this issue does not > occur if the module is executed on the main UI thread, instead of the web > worker. > > > > I have left a link below, to the demo code on how to reproduce the issue: > a function that launches a thread, that launches several threads. It > happens that this second level never gets executed if the function was > called from a web worker. > > > > Maybe I am missing something here, any idea? > > > > Regards, > > SFE > > Link: > https://drive.google.com/file/d/1EtkdRBN1Y8QpsRE19BH5AePAD3VLAV6U/view?usp=sharing > > -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/emscripten-discuss/141a16e4-647e-484c-b36a-8db45addaec8o%40googlegroups.com > <https://groups.google.com/d/msgid/emscripten-discuss/141a16e4-647e-484c-b36a-8db45addaec8o%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTp2Zjoc_OfVO9z2Sq4x1mGDh8PenYO7EJdT%3DOeAv12sA%40mail.gmail.com.
