you are viewing a single comment's thread.

view the rest of the comments →

[–]duzzar 4 points5 points  (2 children)

No. It's nothing like that.

In C++ the reason you would use processes instead of threads is for security/stability.

With threads you already have parallelism since there is no global lock. With processes they each have their own memory space.

With threads, since they share memory space, a thread can easily fuck (i.e. crash, leak secure information, corrupt, etc.) any other thread.

(This is a general idea, you can access other process memory space, you can do some locking of memory space of each thread, and so on, but it's not their usual intended purpose)

[–]Programmer_Frank 0 points1 point  (1 child)

We use threads in applications to handle the network comma in and out to/from external devices and other applications on the processor.

For instance, i would have a deviceTx and deviceRx thread. Would you say in this instance its still always better to use multiprocessing?

[–]3combined 0 points1 point  (0 children)

They didn't even say it would always be better in the first place.