Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Dec 98 08:09:12 -0600
From:      "Richard Seaman, Jr." <lists@tar.com>
To:        "John Birrell" <jb@cimlogic.com.au>, "The Hermit Hacker" <scrappy@hub.org>
Cc:        "freebsd-hackers@FreeBSD.ORG" <freebsd-hackers@FreeBSD.ORG>
Subject:   Re: pthread_cancel() function...
Message-ID:  <199812021409.IAA03962@ns.tar.com>

next in thread | raw e-mail | index | archive | help
On Wed, 2 Dec 1998 13:05:08 +1100 (EST), John Birrell wrote:

>The Hermit Hacker wrote:
>> The closest I can find is pthread_detach(), but according to the man page for pthread_cancel under Solaris, tehy aren't quite the same...
>> 
>> Anyone with experience with this that can comment?
>
>pthread_cancel() requires tests at each of the cancellation points in
>the functions that the standard nominates.
>
>Every time I implement something like this, I suffer from the mail sent
>to me by developers who say "there's no bugs in my code and it works on
>such-n-such, so your code is broken". The use of pthread_cancel() in an
>application often causes resource locking problems (or rather, problems
>with resources not being unlocked before the thread is killed). It is
>an optional part of the standard, which sort-of implies that applications
>shouldn't _require_ it. Are you sure it's not optional in your application?

I was under the impression that pthread_cancel was a manditory,
not optional, part of both the POSIX and SS2 specifications.  However,
I agree it causes problems when used improperly, and it sure seems
like implementing it is a royal pain in the you know what.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812021409.IAA03962>