[linux-audio-dev] How to kill a rogue (p)thread
Jens M Andreasen
jens.andreasen at chello.se
Wed Mar 31 10:24:31 UTC 2004
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
>
More information about the Linux-audio-dev
mailing list