JavaScript Web Workers

The cluster discusses Web Workers as a means to achieve multi-threading in JavaScript, highlighting their limitations like message passing instead of shared memory, comparisons to processes, and mentions of SharedArrayBuffer and WebAssembly threads.

📉 Falling 0.3x Web Development
2,070
Comments
20
Years Active
5
Top Authors
#3572
Topic ID

Activity Over Time

2007
2
2008
3
2009
26
2010
44
2011
56
2012
56
2013
149
2014
101
2015
179
2016
151
2017
183
2018
145
2019
150
2020
118
2021
155
2022
172
2023
137
2024
134
2025
102
2026
7

Keywords

FF CPU JS WebWorkers UseWorker WebAssembly UI WASM SharedArrayBuffers caniuse.com workers threads worker web js dom shared memory const threaded browser

Sample Comments

ilaksh Mar 3, 2014 View on HN

In case people aren't aware there is webworker-threads although this doesn't really solve the same problem.

cromwellian Oct 15, 2013 View on HN

WebWorkers only support message passing, it's more like processes than threads. There's no concept of shared memory.

DDR0 Apr 26, 2021 View on HN

What about web workers, service workers, web assembly threads..?

tracker1 Nov 27, 2013 View on HN

JS has web workers, not shared memory between threads.

jayd16 Nov 1, 2025 View on HN

You mean like with web workers or something?

seanmcdirmid Nov 21, 2013 View on HN

Call me when JavaScript supports threads and not just web workers :(

tachyonbeam May 23, 2013 View on HN

Web workers are more like multiple processes than multiple threads, but yes, there are ways to use more than one CPU core in JS too.

admax88qqq May 8, 2022 View on HN

Too bad JS is single threaded. And the overhead of WebWorkers (multi process) makes it too expensive for all but some niche workloads.

rubber_duck Jun 23, 2018 View on HN

SharedArrayBuffer is only available in chrome and FF and they disable it by default so no way to do standard multithreading via webworkers.

m1sta_ Aug 9, 2014 View on HN

WebWorkers don't really add a lot of complexity to something like this.