Proposal of Multithread JavaScript

Bradley Meck bradley.meck at gmail.com
Wed Nov 2 17:16:36 UTC 2016


> You already have concurrent threads of execution accessing shared mutable
variables with either Promises or async/await. OS level threads are a
particularly nasty variant of multitasking which I'd rather like JS to stay
away from, but I don't see how that'd be an argument against co-routines.

Yes, concurrent and explicitly cooperative. I'm fine with co-routines, just
explicit ones (which we currently have via generators and async functions).
Implicit ones make it hard to reason about if a variable needs to place
guards prior to performing any action if actions pop the stack in order to
do a co-routine pause/resume.

On Wed, Nov 2, 2016 at 12:11 PM, Florian Bösch <pyalot at gmail.com> wrote:

> On Wed, Nov 2, 2016 at 5:59 PM, Bradley Meck <bradley.meck at gmail.com>
> wrote:
>
>> Multiple threads are fine, but the "seamless" shared mutable variables
>> are a no go on my end.
>>
> You already have concurrent threads of execution accessing shared mutable
> variables with either Promises or async/await. OS level threads are a
> particularly nasty variant of multitasking which I'd rather like JS to stay
> away from, but I don't see how that'd be an argument against co-routines.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161102/a7a2b98a/attachment.html>


More information about the es-discuss mailing list