Subj : Re: Windows Suspend/ResumeThread API equivalent for Linux or POSIX? To : comp.programming.threads From : Jomu Date : Wed May 11 2005 01:29 am Been there, done that.... In my case it was because of GC need to stop all threads for a moment to finish GC cycle. A bit of cooperation is a must, and I've used pthread_kill to send SIGRTMIN+7 to threads I need to suspend, waited until designated semaphore signalled all are suspended and used same signal later to resume. One per-thread signal handler, few semaphores, and that is it. It's even as portable as is Boehm's GC :), as he used same pthread_ calls inside his signal handler. It is used to suspend/resume and to get thread context in place for next phase (registers/stack scan for pointers). This is also verrrrry performant. I have it running on a DC HUB (built as a testbed for native threads in Modula-3) with hundreds (up to 1500 observed) of threads running and load average on system is under 1% 99.9% of time. (N-4)/3 are TCP connections so IO and heap trashing are constantly happening :). There is source snapshot at http://home.rstel.net/~dragisha/gc-pthread dd .