You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
Hi,
I was just going thru the source when I noticed the presence of mutex in emscripten/system/include/libcxx/mutex and pthreads in emscripten/system/include/libc/pthread.h. Since the browser is single-threaded, may I know how do we implement mutexes and pthreads under the hoods? Do we really implement synchronization in a multi-threading context? Is this supported only in FireFox Nightly or in Chrome as well? Thanks.
Floh
unread,
Sep 8, 2015, 10:00:03 AM9/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
These used to be empty placeholder functions so that code would at least compile and link.
However, there *is* work going on to enable pthreads-style shared-memory-multithreading in emscripten and Firefox, see here:
Unfortunately I didn't get around to try this out yet.
Cheers,
-Floh
Robert Goulet
unread,
Sep 8, 2015, 11:38:54 AM9/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
pthread implementation on its own in Emscripten seems to be working fine so far. The only problem we have for the moment is we can't use it with WebGL (Firefox Nightly). It produces an assert about the SharedArrayBuffer type not being a correct type argument for some GL calls.
awt
unread,
Sep 8, 2015, 10:46:17 PM9/8/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
Thanks for the reply. Do you know if threads are emulated using webworkers or setTimeout in Emscripten?
Robert Goulet
unread,
Sep 9, 2015, 11:54:35 AM9/9/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to emscripten-discuss
They are using Web Workers, and that means you also need the SharedArrayBuffers from Firefox Nightly to make this work. This is not supported (yet) in Google Chrome AFAIK.
awt
unread,
Sep 14, 2015, 3:40:44 AM9/14/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message