Added clarification to mutex free functions
authorPhilip Withnall <philip@tecnocode.co.uk>
Sat, 1 Aug 2009 15:46:02 +0000 (16:46 +0100)
committerPhilip Withnall <philip@tecnocode.co.uk>
Thu, 6 Aug 2009 17:02:11 +0000 (18:02 +0100)
Clarified that it is A Bad Idea to free a mutex when it's locked.

docs/reference/glib/tmpl/threads.sgml

index 3ee9d61..58c62bd 100644 (file)
@@ -693,6 +693,12 @@ called, and, in that case, will do nothing.
 Destroys @mutex.
 </para>
 
+<note>
+<para>
+Calling g_mutex_free() on a locked mutex may result in undefined behaviour.
+</para>
+</note>
+
 @mutex: a #GMutex.
 
 
@@ -837,6 +843,12 @@ unbounded lifetime, i.e. objects declared 'static', but if you have a
 you should also free the #GStaticMutex.
 </para>
 
+<note>
+<para>
+Calling g_static_mutex_free() on a locked mutex may result in undefined behaviour.
+</para>
+</note>
+
 @mutex: a #GStaticMutex to be freed.