Question : How to suspend/resume a Posix thread

I am trying to convert an app from Win32 to Linux.  In so doing I need to emulate the behavior of Win32 threads which allow you to suspend a thread, and resume a thread (these threads can be threads other than the current one).

Example in Win32:

void suspend_this_thread(HANDLE aHandle)
{
     SuspendThread(aHandle);
}

void resume_this_thread(HANDLE aHandle)
{
     ResumeThread(aHandle);
}

Answer : How to suspend/resume a Posix thread

There is a thread manager class that you can use to control threads, suspend continue, kill etc etc.  You can find it on sourceforge.  You can look at the source code to make sure it is safe first, OR you can suspend thread by making them wait on a semaphore semaphores.
Random Solutions  
 
programming4us programming4us