There is another difference.
You can easily code your programs using threads in (almost) exactly the same way as you would using fork. Simply not sharing the data will cause it to be duplicated(without the COW obviously) and each thread will be able to use it's copy of the data saftly without performing any locking, or even giving it any consideration.
The advantage comes when each of the 'processes' has reach a result. At that point, it becomes extremely easy for the 'parent process' (originating thread) to gather all the results from its children together and perform further processing -- eg. collating those results -- without requiring a tiresome and dangerous adventure holiday to the mysterious world of Eyepee Sea.
In reply to Re^2: Using clone/dclone with threads
by BrowserUk
in thread Using clone/dclone with threads
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |