RecMutex.init_

Initializes a #GRecMutex so that it can be used.

This function is useful to initialize a recursive mutex that has been allocated on the stack, or as part of a larger structure.

It is not necessary to initialise a recursive mutex that has been statically allocated.

  typedef struct {
    GRecMutex m;
    ...
  } Blob;

Blob *b;

b = g_new (Blob, 1);
g_rec_mutex_init (&b->m);

Calling glib.rec_mutex.RecMutex.init_ on an already initialized #GRecMutex leads to undefined behaviour.

To undo the effect of glib.rec_mutex.RecMutex.init_ when a recursive mutex is no longer needed, use glib.rec_mutex.RecMutex.clear.

class RecMutex
void
init_
()