Open Bug 1385876 Opened 2 years ago

Threading coverage on MDN


(Developer Documentation :: JavaScript, enhancement)

Not set


(Not tracked)


(Reporter: cmills, Unassigned)


We got this on IRC a little while ago:

"Hello, do we need an article to explain threading for JS? This article,, explains Web Workers running via background threads. But what are threads? All we know is that JS runs in a single-threaded fashion, but it isn't clear to me whether there's multiple threads or not.

Adding to the fact we have "background scripts" for WebExtensions, it had confused some developers in the concept of "processes running in the background". Are background scripts in WebExtensions similar to "background threads"? I wished there is an article that goes into detail on this.”

Do we have anything anywhere that covers threading/background scripts/worker threads on MDN? If not, would it be worth writing up a short article to cover this concept somewhere? A glossary entry at least?"

I talked to Florian about this, and he responded like so:

"It would be nice to come up with an article that puts the Event Loop, Web Workers, and Shared Memory into broader context and does comparisons to other languages where threading exists.

For the event loop the relevant MDN JS page is
And this talk

For web workers we have the article you've mentioned and for Shared Memory there is a hacks post by Lars and more by Lin I think.

Oh and is also interesting.

This is one of these topics that really needs some good research and expertise to actually write something up that is useful."

We ought to write something about this if we can find the time at some point in the future.
You need to log in before you can comment on or make changes to this bug.