Process or Thread?


  • 0
    A

    If you want to create a software which consists of a video and its audio and subtittle file running in the background, what would you chose to create; process or thread?


  • 1
    A

    Thread. Since all the three different actions - video, audio and subttitle run over the same background and are in absolute synchronization, thread is the best option.


  • 1
    S

    Thread.
    Thread is easy to maintain synchronize status between each other. Process is more heavy weight.
    But there're also exceptions. Your software in general runs in low priority, but when you want to play a video, say 4k. You may want to raise the priority. In this case, you need to create a new process and require higher priority, while thread can't achieve.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.