StaticPrivate.set

Sets the pointer keyed to private_key for the current thread and the function notify to be called with that pointer (NULL or non-NULL), whenever the pointer is set again or whenever the current thread ends. This function works even if g_thread_init() has not yet been called. If g_thread_init() is called later, the data keyed to private_key will be inherited only by the main thread, i.e. the one that called g_thread_init(). Note notify is used quite differently from destructor in g_private_new().

class StaticPrivate
void
set

Parameters

data void*

the new pointer.

notify GDestroyNotify

a function to be called with the pointer whenever the current thread ends or sets this pointer again.

Meta