Running two threads at the same time

前端 未结 7 1822
南旧
南旧 2020-11-29 20:07

I want to know if a program can run two threads at the same time (that is basically what it is used for correct?). But if I were to do a system call in one function where it

7条回答
  •  执笔经年
    2020-11-29 20:20

    Two thread can run concurrently only if it is running on multiple core processor system, but if it has only one core processor then two threads can not run concurrently. So only one thread run at a time and if it finishes its job then the next thread which is on queue take the time.

提交回复
热议问题