|
|
|
|
|
by judah
3263 days ago
|
|
Are locks and mutable shared memory a good thing? Advances in modern programming languages aim to abstract threads away (e.g. .NET's Task Parallel Library), because mutable memory shared between threads is a minefield (atomic, locks, mutexes, compare-exchange, etc.). 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... |
|