I agree node is much more interesting for those reasons. However, it may be
much easier to do this in d8 since it has that custom synchronous API.

On Wed, Jul 10, 2019 at 10:40 AM 'Steven Johnson' via emscripten-discuss <
[email protected]> wrote:

> I'd be content with either one.
>
> On Wed, Jul 10, 2019 at 10:24 AM 'Sam Clegg' via emscripten-discuss <
> [email protected]> wrote:
>
>> I think its a lot more interesting to support threads in node that in
>> d8.  node is widely used and has official releases.  d8 is designed as
>> an internal testing tool for v8 a IIUC nothing else.
>>
>> On Mon, Jul 8, 2019 at 11:32 AM Alon Zakai <[email protected]> wrote:
>> >
>> > I don't think it's quite that official, as it appears undocumented. But
>> I have heard that they use it internally and don't plan to change it. So
>> it's on par with all of d8 basically, which is not standardized/documented,
>> but still very useful.
>> >
>> > Another option is to try to get node Workers working. I have some wip
>> stuff in the node-pthreads branch, but I ran out of time - would be great
>> if someone else can look at that. Basically, the challenge is that logging
>> etc. is impossible when the main thread blocks, which makes it very hard to
>> debug. But it might be possible to get working. (d8's nonstandard blocking
>> APIs make things easier)
>> >
>> > - Alon
>> >
>> >
>> >
>> > On Mon, Jul 8, 2019 at 10:05 AM 'Steven Johnson' via emscripten-discuss
>> <[email protected]> wrote:
>> >>
>> >> This is (potentially) great news; being able to test wasm-threads code
>> via d8 (rather than a full browser interaction) would make future Halide
>> support for threading much easier to support. But is this a deliberate,
>> long-term commitment on the part of V8 to provide enough WebWorker support
>> to support wasm threading? (We wouldn't entertain using this otherwise.)
>> >>
>> >> On Tue, Jul 2, 2019 at 2:02 PM Alon Zakai <[email protected]> wrote:
>> >>>
>> >>> Thanks, I didn't know the V8 shell had this!
>> >>>
>> >>> After asking some people, it sounds like this can indeed be useful
>> for us. It isn't intended to be identical to the Web API for Workers, but
>> it is not a temporary API, so we can rely on it for testing.
>> >>>
>> >>>  -  I think we'd need to work around any API differences like that
>> .data thing, by checking if we are in "ENVIRONMENT_IS_SHELL" etc.
>> >>>  - The synchronous getMessage is a special d8 extension, yeah - if
>> it's useful for us then no reason not to use it (but yeah, such things are
>> probably not well documented except in the source...).
>> >>>
>> >>> PR sounds great!
>> >>>
>> >>> - Alon
>> >>>
>> >>>
>> >>> On Sat, Jun 29, 2019 at 3:48 AM Zoltan Varga <[email protected]>
>> wrote:
>> >>>>
>> >>>> Hi,
>> >>>>
>> >>>>  It looks like recent versions of V8's JS shell support web workers,
>> so it is possible to run emscripten+pthreads in this shell. This is useful
>> for running test suites which
>> >>>> use threads as it requires less work than running in the browser.
>> >>>>
>> >>>> Ran into the following problems:
>> >>>> - the message received by onmessage () is not wrapped in a 'data'
>> property. This might be a bug in D8.
>> >>>> - the main threads onmessage () seems to be only called when control
>> returns to the main loop which never seems to happen in the JS shell, so
>> the 'loaded' message
>> >>>>   is never received by the main thread, so startup fails. Worked
>> around it by receiving the message synchronously using worker.getMessage ()
>> and passing it to
>> >>>>   onmessage (). Couldn't find too much documentation on getMessage
>> (), is it a V8 extension ?
>> >>>>
>> >>>> Here is a commit with the changes:
>> >>>>
>> https://github.com/vargaz/emscripten/commit/99e8ab6fb5e2a46a880aebe30014f6065b1c1b35
>> >>>>
>> >>>> Wanted to discuss these isues before making it into a PR.
>> >>>>
>> >>>>                     Zoltan
>> >>>>
>> >>>>
>> >>>> --
>> >>>> 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/95c693a4-7d24-4e40-9bff-7ea1e960daa4%40googlegroups.com
>> .
>> >>>> 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].
>> >>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpQukKgBZQ3eLFxH0UCNotCWQchQ7S6cgMXDLM_Tus4wwA%40mail.gmail.com
>> .
>> >>> 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].
>> >> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAM%3DdnvdOyGe_tA7Zz9mbE9P0jBcJpdxiPpAkc9t63_fudKcqiQ%40mail.gmail.com
>> .
>> >> 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].
>> > To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpR0kdprd54PB0UoBU-ExcJKM8r7uyDAqxMdLoxc7sH4aA%40mail.gmail.com
>> .
>> > 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].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28Kf1iVCQKhNRGS2Q%2BSXAPzvZqhqt-QVju%3DjEPZCOmR8g%40mail.gmail.com
>> .
>> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/CAM%3Ddnvf_g7CJ%2BiO_Fg6XJVsGi0qaUdVKVfOebcjTuP07%3DiGMpw%40mail.gmail.com
> <https://groups.google.com/d/msgid/emscripten-discuss/CAM%3Ddnvf_g7CJ%2BiO_Fg6XJVsGi0qaUdVKVfOebcjTuP07%3DiGMpw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpSozr0gBZiL0xiQ23A5aZ0S4ip5ZNteZ9zj96Q7HfxLJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to