2 ms·
As opposed to what, threads? They have contributed towards improving software quality? In most languages with mutable state they've been a disaster -- correct m
by spion 13y ago
As opposed to what, threads? They have contributed towards improving software quality? In most languages with mutable state they've been a disaster -- correct me if I'm wrong.
Adding threads in JavaScript would also be a disaster. Practically everything is mutable and there are absolutely no locking mechanisms.
- audreyt 13y agoOne possible solution to introduce threads to JS is to isolate threads from each other and use only message-passing: https://github.com/audreyt/node-webworker-threads/ https://github.com/audreyt/node-webworker-threads/
- spion 13y agoSorry, but share-nothing threads that can only communicate via (afaics) serialized message passing are no longer threads. There is very little benefit to those compared to just spawning child processes.