This function is useful to initialize a mutex that has been
allocated on the stack, or as part of a larger structure.
It is not necessary to initialize a mutex that has been
statically allocated.
typedefstruct {
GMutex m;
...
} Blob;
Blob *b;
b = g_new (Blob, 1);
g_mutex_init (&b->m);
Initializes a glib.Mutex so that it can be used.
This function is useful to initialize a mutex that has been allocated on the stack, or as part of a larger structure. It is not necessary to initialize a mutex that has been statically allocated.
To undo the effect of Mutex.init when a mutex is no longer needed, use Mutex.clear.
Calling Mutex.init on an already initialized glib.Mutex leads to undefined behaviour.