Parallel coding Vs Multithreading (on single cpu)

前端 未结 7 1350
忘掉有多难
忘掉有多难 2020-12-30 13:11

can we use interchangeably \"Parallel coding\" and \"Multithreading coding \" on single cpu?

i am not much experience in both, but i want to shift my coding style t

7条回答
  •  一向
    一向 (楼主)
    2020-12-30 13:27

    The question is a bit confusing as you can perform parallel operations in multiple threads, but all multi-thread applications are not using parallel computing. In parallel code, you typically have many "workers" that consume a set of data to return results asynchronously. But multithread is used in a broader scope, like GUI, blocking I/O and networking.

    Being on a single or many CPU does not change much, as the management depends on how your OS can handle threads and processes.

    Multithreading will be useful everywhere, parallel is not everyday computing paradigm, so it might be a "niche" in a career prospect.

提交回复
热议问题