This is the mail archive of the
mailing list for the pthreas-win32 project.
RE: pthread_cond_destroy and cancel
- From: "Bossom, John" <John dot Bossom at Cognos dot COM>
- To: "Romano Paolo Tenca" <rotenca at telvia dot it>, "Pthreads-Win32 list" <pthreads-win32 at sources dot redhat dot com>
- Date: Tue, 13 Jun 2006 10:02:19 -0400
- Subject: RE: pthread_cond_destroy and cancel
I agree that pthread_cond_destroy is not be a cancellation point. It is
not documented as such in the standard.
The fact that it is (now) implemented with a sem_wait, is an
implementation detail that should be isolated from the caller. I would
consider this to be a bug.
John E. Bossom
[mailto:email@example.com] On Behalf Of Romano Paolo
Sent: Tuesday, June 13, 2006 6:26 AM
To: Pthreads-Win32 list
Subject: Re: pthread_cond_destroy and cancel
The problem with the code is that pthread_cond_destroy() is a
cancellation point, because it can call sem_wait().
A weak workaround is to call
BTW, pthread_cond_destroy is not in the list of cancellation points
I think that a destroy function should not be a cancellation point, else
cleanup routine can easy deadlock itself.
Romano Paolo Tenca
This message may contain privileged and/or confidential information. If you have received this e-mail in error or are not the intended recipient, you may not use, copy, disseminate or distribute it; do not open any attachments, delete it immediately from your system and notify the sender promptly by e-mail that you have done so. Thank you.