Proposal of Multithread JavaScript

Wes Garland wes at
Wed Nov 2 17:49:56 UTC 2016

I'm still confused about what problem we are trying to solve here.

I had pthreads-style JS running in JS 1.7 many years ago (, and after
investing quite a lot of time in making it work, I found that it wasn't
really all that useful in solving any problems I had at the time. Or
since.  Mostly it was written for problems I thought I had, because I was a
C developer trying to bend JS to fit old thought patterns.

Lately, I have been using messaging passing a la DOM workers when I need
parallelization and find it quite useful.

Incidentally, there is no "single thread dogma".  I don't know where you
get this idea.  Running multiple threads of unrelated JS is completely
supported by the existing spec and at least one of the engines.

Finally, Message Passing is not a JS problem either, IMO.  It's a host
environment problem.  This is why, for example, we have DOM workers and not
JS workers.  If you want workers for some other (ie non-browser)
environment, just write it.  It's not hard, and it doesn't need to be part
of the language.


On 2 November 2016 at 13:32, Florian Bösch <pyalot at> wrote:

> On Wed, Nov 2, 2016 at 6:16 PM, Bradley Meck <bradley.meck at>
> wrote:
>> 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.
> As I've illustrated, the natural tendency of explicit tagged asynchronous
> code combined with proper software engineering (separation of concerns,
> modularity, reuse, interfaces, encapsulation etc.) will be to infect most
> code with it, until the distinction of "explicit" becomes entirely
> meaningless.
> _______________________________________________
> es-discuss mailing list
> es-discuss at

Wesley W. Garland
Director, Product Development
PageMail, Inc.
+1 613 542 2787 x 102
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list