I have been trying to get Async++ which is a lightweight concurrency framework for C++11 compiled under emscripten :- https://github.com/Amanieu/asyncplusplus/wiki. The library states that all it requires is a C++11 compiler and standard library so I believe that it should be possible to do so using pthreads and asm.js. I have managed to compile the library using "-O2 --memory-init-file 0 -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=8 -std=c++11 -Wall -Wextra -pedantic -fno-rtti" and link it to a small test program but it does not seem to work. The test program runs fine natively in linux but when I try and use the emscripten version in a browser it ends up sending a browser thread to 100% cpu and I have to kill it. Obviously some of the synchronization is not working correctly but I don't see why that should be so since the library only requires C+11 and emscripten supports that. I am using Chrome Version 63.0.3239.84 (Official Build) (64-bit) and emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.37.22, clang version 4.0.0 (emscripten 1.37.22 : 1.37.22), Target: x86_64-unknown-linux-gnu, Thread model: posix. I realise that this is a very wide question but I was wondering if someone could give me some guidance as to whether what I am trying to do should be possible or not. I am aware that Javascript doesn't support the full range of memory orderings that C+11 does but I would have thought it should still work with somewhat less performance.Thanks, Shane.
--
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 emscripten-discuss+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.