Subj : Re: Answer David Schwartz 's question To : comp.programming.threads From : David Schwartz Date : Tue Apr 05 2005 02:32 am "Oliver Battenfeld" wrote in message news:2544463.7mSbX45zVr@odb.my-fqdn.de... >>> Can't main thread do anything after STOP other threads? >> Nope. Suppose another thread was in the middle of 'malloc' when you >> stopped it. > Question then: What happens, if one such thread is preempted "in the > middle > of malloc" by the main thread? That's the reason you can't just arbitrarily pre-empt another thread. You have to use some controlled method that involved the cooperation of the other thread. However, this is a textbook example of a "wrong question". Why would you want to stop a thread anyway? Odds are you really want to stop any thread from doing a particular thing, not stop a particular thread in itself. DS .