Forking creates a copy of the current process, while threads run in the same process and are usually used to calculate something in the background, so the application does not seem to be frozen.
Regarding the usefulness of threads versus forking, I would go with threads if you don't have a specific need for a second process.
Regarding thread creation, I would recommend using the pthreads library. It will work on any UNIX operating system (Linux, BSD, Mac OS X), but is relatively low. If you want something higher level, check out QThread from QT.
source share