Subject: Re: [linux-audio-dev] How to kill a rogue (p)thread
From: Jens M Andreasen (jens.andreasen_AT_chello.se)
Date: Wed Mar 31 2004 - 13:24:31 EEST
On ons, 2004-03-31 at 11:02, Jens M Andreasen wrote:
> So go for autonomous threads. Your code will be easier to read and
> maintain, and therefore also more likely to be correct.
>
Just for the record. You probably already know this ...
I forgot to mention the pthread_cleanup_push/pop pair which can make
life somewhat easier when the reason for termination is not known at
compile time.
This of course implies use of pthread_exit instead of return.
Last time I checked they were defined as macros, so gcc -Wall might bark
at you when you are cascading several instances in the same function.
>
> /jens
>
This archive was generated by hypermail 2b28 : Wed Mar 31 2004 - 13:29:46 EEST