3 ms·
Can it be summarized with: multi-threading in non-functional languages is the most confusing and most time consuming thing?
by bboygravity 4y ago
Can it be summarized with: multi-threading in non-functional languages is the most confusing and most time consuming thing?
- ActorNightly 4y agoIts neither time consuming or confusing if you understand the concept of mutex, which is only one thread can access a resource at any given time. Anything beyond that is irrelevant for 99% of the use cases for multiple threading. And furthermore, its highly likely that your project is better suited to async programming instead.
- xupybd 4y agoNot exactly. I wasn't just talking about multi threaded systems but multi machine systems too. Where there is no shared memory. If you need to serialize your data to send out to a cluster for processing you've already constrained yourself to immutable data.
- badpun 4y agoMost webapps are actually embarassingly parallel (https://en.wikipedia.org/wiki/Embarrassingly_parallel https://en.wikipedia.org/wiki/Embarrassingly_parallel) and require little synchronisation. Most of the hard synchronisation problems are solved for you in the DB (at least if you've chosen a good one).