Pros and Cons of the Pthread Web Build

The deed is done, here's the change:

It says "+202 / -644" and all the + are comments explaining what happened. The real news story is the deletions in %mod-javascript.js, where all the thread code is removed, and almost as importantly the deletions in main.yml, where the testing is removed. One build path and one binary has a very big value.

I did not get rid of the worker.js loading related code. We may support pthreads for other reasons in the future...e.g. using a library that truly is concurrent code. We're only axing it here for the foundational purpose of suspending the interpreter long enough to make JS calls and then resume it without skipping a beat. Other motivators might have us loading C code built with pthreads... we just wouldn't require it for console operation or other basic DOM manipulation.

I know this is a sort of esoteric-sounding detail but it does have a really big impact. When I talked about the importance of "Switching to Stackless: Why This, Why Now" it was precisely to inform this kind of issue. We're gambling about what's going to be true a year from now, two years from now, and then beyond. It's not easy.

2 Likes