Package ch.bailu.gtk.glib
Klasse StaticRecMutex
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.type.Record
ch.bailu.gtk.glib.StaticRecMutex
- Alle implementierten Schnittstellen:
PointerInterface
A #GStaticRecMutex works like a #GStaticMutex, but it can be locked
multiple times by one thread. If you enter it n times, you have to
unlock it n times again to let other threads lock it. An exception
is the function g_static_rec_mutex_unlock_full(): that allows you to
unlock a #GStaticRecMutex completely returning the depth, (i.e. the
number of times this mutex was locked). The depth can later be used
to restore the state of the #GStaticRecMutex by calling
g_static_rec_mutex_lock_full(). In GLib 2.32, #GStaticRecMutex has
been deprecated in favor of #GRecMutex.
Even though #GStaticRecMutex is not opaque, it should only be used
with the following functions.
All of the g_static_rec_mutex_* functions can be used even if
g_thread_init() has not been called. Then they do nothing, apart
from g_static_rec_mutex_trylock(), which does nothing but returning
%TRUE.
multiple times by one thread. If you enter it n times, you have to
unlock it n times again to let other threads lock it. An exception
is the function g_static_rec_mutex_unlock_full(): that allows you to
unlock a #GStaticRecMutex completely returning the depth, (i.e. the
number of times this mutex was locked). The depth can later be used
to restore the state of the #GStaticRecMutex by calling
g_static_rec_mutex_lock_full(). In GLib 2.32, #GStaticRecMutex has
been deprecated in favor of #GRecMutex.
Even though #GStaticRecMutex is not opaque, it should only be used
with the following functions.
All of the g_static_rec_mutex_* functions can be used even if
g_thread_init() has not been called. Then they do nothing, apart
from g_static_rec_mutex_trylock(), which does nothing but returning
%TRUE.
-
Feldübersicht
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Konstruktordetails
-
StaticRecMutex
-
-
Methodendetails
-
getClassHandler
-
free
Veraltet.Releases all resources allocated to a #GStaticRecMutex.
You don't have to call this functions for a #GStaticRecMutex with an
unbounded lifetime, i.e. objects declared 'static', but if you have
a #GStaticRecMutex as a member of a structure and the structure is
freed, you should also free the #GStaticRecMutex. -
init
Veraltet.A #GStaticRecMutex must be initialized with this function before it
can be used. Alternatively you can initialize it with
%G_STATIC_REC_MUTEX_INIT. -
lock
Veraltet.Locks @mutex. If @mutex is already locked by another thread, the
current thread will block until @mutex is unlocked by the other
thread. If @mutex is already locked by the calling thread, this
functions increases the depth of @mutex and returns immediately. -
lockFull
Veraltet.Works like calling g_static_rec_mutex_lock() for @mutex @depth times.- Parameter:
depth
- number of times this mutex has to be unlocked to be completely unlocked.
-
trylock
Veraltet.Tries to lock @mutex. If @mutex is already locked by another thread,
it immediately returns %FALSE. Otherwise it locks @mutex and returns
%TRUE. If @mutex is already locked by the calling thread, this
functions increases the depth of @mutex and immediately returns
%TRUE.- Gibt zurück:
- %TRUE, if @mutex could be locked.
-
unlock
Veraltet.Unlocks @mutex. Another thread will be allowed to lock @mutex only
when it has been unlocked as many times as it had been locked
before. If @mutex is completely unlocked and another thread is
blocked in a g_static_rec_mutex_lock() call for @mutex, it will be
woken and can lock @mutex itself. -
unlockFull
Veraltet.Completely unlocks @mutex. If another thread is blocked in a
g_static_rec_mutex_lock() call for @mutex, it will be woken and can
lock @mutex itself. This function returns the number of times that
@mutex has been locked by the current thread. To restore the state
before the call to g_static_rec_mutex_unlock_full() you can call
g_static_rec_mutex_lock_full() with the depth returned by this
function.- Gibt zurück:
- number of times @mutex has been locked by the current thread.
-