Re: Question on pthread_cancel/pthread_exit and thread stack unwind

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

 



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