Process vs Threads

前端 未结 6 391
余生分开走
余生分开走 2021-01-31 18:21

How to decide whether to use threads or create separate process altogether in your application to achieve parallelism.

6条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-31 18:45

    Processes have more isolated memory. This is important for a number of reasons:

    • It is harder for a single task to crash the other tasks.
    • More memory will be available per process. This is important for large, high-performance applications like Apache or database servers, like Postgres. This is important for both allocated memory and memory mapped files.

提交回复
热议问题