This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: destroying a locked mutex
- To: "Scott McCaskill" <scott at magruder dot org>
- Subject: Re: destroying a locked mutex
- From: "Alexander Terekhov" <TEREKHOV at de dot ibm dot com>
- Date: Tue, 24 Jul 2001 18:46:33 +0200
- Cc: pthreads-win32 at sources dot redhat dot com
> Should pthread_mutex_destroy() return an error if the mutex is locked?
POSIX standard says: "Attempting to destroy a locked mutex
results in undefined behavior."
in general, you should not destroy any object unless you
are absolutely sure that no one else is using it and/or
no reachable refs/ptrs to it is left somewhere around.
regards,
alexander.
"Scott McCaskill" <scott@magruder.org> on 07/24/2001 06:15:18 PM
Please respond to "Scott McCaskill" <scott@magruder.org>
To: pthreads-win32@sources.redhat.com
cc:
Subject: destroying a locked mutex
Should pthread_mutex_destroy() return an error if the mutex is locked?
pthreads-win32 seems to disagree with the linux implementation of pthreads
on this point (OK on windows, not on linux).