Date: Wed, 2 Dec 1998 00:57:14 -0400 (AST) From: The Hermit Hacker <scrappy@hub.org> To: John Birrell <jb@cimlogic.com.au> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: pthread_cancel() function... Message-ID: <Pine.BSF.4.05.9812020053410.4737-100000@thelab.hub.org> In-Reply-To: <199812020205.NAA07037@cimlogic.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2 Dec 1998, 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? Very sure, but the developer has been *very* receptive to fixes and patches that I've sent him...what would you suggest? Just replace with pthread_detach() if pthread_cancel() doesn't exist? Or something altogether different? Marc G. Fournier Systems Administrator @ hub.org primary: scrappy@hub.org secondary: scrappy@{freebsd|postgresql}.org 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?Pine.BSF.4.05.9812020053410.4737-100000>