Subj : Re: Windows Suspend/ResumeThread API equivalent for Linux or POSIX? To : comp.programming.threads From : Casper H.S. Dik Date : Thu May 12 2005 10:47 am "Chris Thomasson" <_no_damn_spam_cristom@_no_damn_comcast.net_spam> writes: >>> If you can't guarantee this with 100% certainty, then using SuspendThread >>> is like playing with a lit stick of dynamite. >> >> You never can. You never know when a libarary might commandeer your >> thread and go near a sync object. >I have total control over the research application. It has never had any >problems with some other library hijacking its threads. In fact, what >exactly are you getting at here? When you suspend a thread which uses any type of sync object, the thread may be holding it while it is suspended. In the particular case of a garbage collector and a shared memory pool, a thread may be holding a lock to the memory pool and it may be in an inconsitent state. You should also keep in mind that when you start with garbage collection, non-portability rears its ugly head in many way: you will need to know not only about the stack but also about register save areas used by the kernel which may not be easily available. Casper -- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth. .