Why should I use a thread vs. using a process?

前端 未结 8 1630
南旧
南旧 2020-12-12 13:36

Separating different parts of a program into different processes seems (to me) to make a more elegant program than just threading everything. In what scenario would it make

8条回答
  •  醉梦人生
    2020-12-12 14:17

    In addition to the other answers, maintaining and deploying a single process is a lot simpler than having a few executables.

    One would use multiple processes/executables to provide a well-defined interface/decoupling so that one part or the other can be reused or reimplemented more easily than keeping all the functionality in one process.

提交回复
热议问题