News for hackers. Stuff that matters.
Re:Is Parallel Programming Hard, and, If So, What Can You Do... by spacechild1 on Wednesday February 22, 2023 @03:01PM (#34901772)
> I've listed 5 different multithreaded techniques at the beginning of this discussion.

Unsurprisingly, I have a problem with that list as well. It mixes things that belong to different categories. A process is an execution context while the rest are synchronization mechanisms. For example, it is possible to synchronize two processes with atomic variables (in shared memory). Also, the list misses any kind of higher level threading primitive (concurrent queues, channels, futures, etc.). There is a whole world above explicit mutex locking.

> I'm pointing out that #1 is easier than #2.

I totally believe you when you say that subprocesses are the preferred solution for your particular use cases. It just does not make sense as general advice. It's nice that they are isolated, but you cannot just downplay all the downsides.

There are no comments on this comment yet.