From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexander Terekhov" To: "Scott McCaskill" Cc: pthreads-win32@sources.redhat.com Subject: Re: destroying a locked mutex Date: Tue, 24 Jul 2001 09:46:00 -0000 Message-id: X-SW-Source: 2001/msg00066.html > 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" on 07/24/2001 06:15:18 PM Please respond to "Scott McCaskill" 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).