Subj : Re: pthreads - cancellation To : comp.programming.threads From : plinius Date : Sun Aug 21 2005 07:43 am David Schwartz schreef: > wrote in message > news:1124588034.657514.267800@o13g2000cwo.googlegroups.com... > > > Is it possible to stop a thread from another one? > > Just code that other thread to stop. Threads are not at war with each > other, they're all running code that you write. So just code each thread to > do what you want. What do you mean? Suppose, I have: 1)thread A: blocking receive (so I can't shutdown from A self, since it's blocked...) 2)thread B: wants to restart thread A. > > Suppose I have the following case: A,B,C are blocked by a recv. > > The communicator of B changes. D wants to kill and restart thread B so > > that it's healthy again. > > > > How should I do that? > > Call 'shutdown' on the socket it's blocked on. Thanks, but the library is mpi, which doesn't has a "shutdown"-operation... > > DS .