|
|
|
|
|
by ihsw2
3263 days ago
|
|
Notably, with shared memory and atomics, pthreads support is on the horizon. https://kripken.github.io/emscripten-site/docs/porting/pthre... Granted it may be limited to consumption via Emscripten, it is nevertheless now within the realm of possibility. For this that cannot grok the gravity of this -- proper concurrent/parallel execution just got a lot closer for those targeting the browser. |
|
Not only are these difficult to reason about and program against, introducing locks over mutable memory causes performance problems and are a speed bump to high concurrency. (Heck, just yesterday on HN, a story was published "24-core CPU and I can't move my mouse" [0] - the culprit? Low-level locks.)
Creating too many threads introduces performance problems, too, thanks to CPU context switching; pools must be created and threads reused from those pools.
And now in JS land we're trying to introduce threads and mutable shared memory? Are we just going to learn these lessons over again?
[0]: https://randomascii.wordpress.com/2017/07/09/24-core-cpu-and...