Frosty555
asked on
What is joining and forking threads?
I have a high level understanding of threads, mutexes, etc. and about avoiding race conditions, sharing memory etc between threads, and making threads sleep / how timesharing works between threads and processes.
But my knowledge is very high-level, I'm used to using thread libraries like what is provided by .NET, Java or the QT library.
What does it mean to "fork" a thread, or "join" a thread, when you're dealing with POSIX threads in C? Also what is thread "signalling", if such a thing exists?
But my knowledge is very high-level, I'm used to using thread libraries like what is provided by .NET, Java or the QT library.
What does it mean to "fork" a thread, or "join" a thread, when you're dealing with POSIX threads in C? Also what is thread "signalling", if such a thing exists?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
so with Windows you call CreateProcess() if you want to create a new process but though similar this is not identical to forking a process on Unix
By the word "fork a thread", are you asking how to start a thread?
If that is so, then you should use pthread_create() call to create a new thread.
If that is so, then you should use pthread_create() call to create a new thread.