Gda.Lockable¶
- Implementations:
Methods¶
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Gda.Lockable¶
- Bases:
- Structure:
- lock()¶
Locks self. If it is already locked by another thread, the current thread will block until it is unlocked by the other thread.
This function can be used even if g_thread_init() has not yet been called, and, in that case, will do nothing.
Note: unlike
GLib.Mutex.lock
(), this method recursive, which means a thread can lock self several times (and has to unlock it as many times to actually unlock it).
- trylock()¶
-
Tries to lock self. If it is already locked by another thread, then it immediately returns
False
, otherwise it locks self.This function can be used even if g_thread_init() has not yet been called, and, in that case, will do nothing.
Note: unlike
GLib.Mutex.lock
(), this method recursive, which means a thread can lock self several times (and has to unlock it as many times to actually unlock it).
- unlock()¶
Unlocks self. This method should not be called if the current does not already holds a lock on self (having used
Gda.Lockable.lock
() orGda.Lockable.trylock
()).This function can be used even if g_thread_init() has not yet been called, and, in that case, will do nothing.
- do_i_lock() virtual¶
- do_i_unlock() virtual¶