I am running a kind of watchdog thread to
terminate other runaway threads.
Although calling setCancel (cancelImmediate)
I only see the thread cancelling at a
cancellation point (like e.g. sleep()).
Is this correct Posix behaviour
or a platform specifiy PThread-bug
(I am trying this under FreeBSD 4.6.)
CommonC++ itself obviously seems to
do nothing wrong, as far as I understand.
Currently I get around this by sending a SIGABRT
to the runaway thread, doing a longjmp() from
onException() into initial() and calling testCancel()
in initial(). It works but looks pretty complicated for me.
Thanks in advance,
Norbert Koch
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have noticed a few other abberations in thread behavior under FreeBSD specifically, and I suspect they only support soft cancellation points currently. Have you tried the port of LinuxThreads under FreeBSD? There is now an option to Build Common C++ for this...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I am running a kind of watchdog thread to
terminate other runaway threads.
Although calling setCancel (cancelImmediate)
I only see the thread cancelling at a
cancellation point (like e.g. sleep()).
Is this correct Posix behaviour
or a platform specifiy PThread-bug
(I am trying this under FreeBSD 4.6.)
CommonC++ itself obviously seems to
do nothing wrong, as far as I understand.
Currently I get around this by sending a SIGABRT
to the runaway thread, doing a longjmp() from
onException() into initial() and calling testCancel()
in initial(). It works but looks pretty complicated for me.
Thanks in advance,
Norbert Koch
I have noticed a few other abberations in thread behavior under FreeBSD specifically, and I suspect they only support soft cancellation points currently. Have you tried the port of LinuxThreads under FreeBSD? There is now an option to Build Common C++ for this...