| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.GLib.Structs.RecMutex
Description
The GRecMutex struct is an opaque data structure to represent a
recursive mutex. It is similar to a Mutex with the difference
that it is possible to lock a GRecMutex multiple times in the same
thread without deadlock. When doing so, care has to be taken to
unlock the recursive mutex as often as it has been locked.
If a RecMutex is allocated in static storage then it can be used
without initialisation. Otherwise, you should call
recMutexInit on it and recMutexClear when done.
A GRecMutex should only be accessed with the g_rec_mutex_ functions.
Since: 2.32
Synopsis
- newtype RecMutex = RecMutex (ManagedPtr RecMutex)
- newZeroRecMutex :: MonadIO m => m RecMutex
- recMutexClear :: (HasCallStack, MonadIO m) => RecMutex -> m ()
- recMutexInit :: (HasCallStack, MonadIO m) => RecMutex -> m ()
- recMutexLock :: (HasCallStack, MonadIO m) => RecMutex -> m ()
- recMutexTrylock :: (