It's hard to talk about adavantages and disadvantages. Threads and processes are just designed to different tasks. When you have an app that needs to run another, get its result and do something with it, you'll use a process. If you have an app that does many things at one time (let's say a web server that handles a number of connections, but shares large amount of data between them), thread is a good solution.
|