Hi,
Today I read some code which creates multiple threads. For each of them, a child process is created to call a stand-alone executable with communication in input to and output from it. I asked myself why not simple using multi-process without multi-thread.
So here I would like to know in principle how to choose between multiple threading and multiple processing and when to combine them together with multi-process in each thread or multi-thread in each process, i.e. in what scenarios which way is better in terms of speed and difficulty in communication and implementation, etc?
If I have multiple tasks on a multiple core/cpu server, which way is better(faster): call them as multi-process in a code file or open several terminals each of which calls the executable of a task?
Thanks and regards!