Re: Question on pthread_cancel/pthread_exit and thread stack unwind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






Thanks for the suggestion, it is REALLY a good suggestion, however, the
real world is not that idea,
we are in a situation that it has to work, we can not depend on all
developers and third party code
to be all nice.

Yufeng




                                                                           
             Eljay Love-Jensen                                             
             <eljay@xxxxxxxxx>                                             
                                                                        To 
             09/16/2004 03:40          Yufeng_Xiong@xxxxxxx,               
             PM                        gcc-help@xxxxxxxxxxx                
                                                                        cc 
                                                                           
                                                                   Subject 
                                       Re: Question on                     
                                       pthread_cancel/pthread_exit and     
                                       thread stack  unwind                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi Yufeng,

Refrain from using pthread_cancel and pthread_exit.  Those are Big Hammers
and Sharp Knives.

Instead, set a variable that is monitored by the thread and set by the
owner-thread / main thread which signals the child thread to terminate
gracefully.

Mutex / condvar yada yada yada like normal apply.

HTH,
--Eljay




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux