| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.GLib.Structs.Thread
Description
The #GThread struct represents a running thread. This struct is returned by g_thread_new() or g_thread_try_new(). You can obtain the #GThread struct representing the current thread by calling g_thread_self().
GThread is refcounted, see g_thread_ref() and g_thread_unref(). The thread represented by it holds a reference while it is running, and g_thread_join() consumes the reference that it is given, so it is normally not necessary to manage GThread references explicitly.
The structure is opaque -- none of its fields may be directly accessed.
- newtype Thread = Thread (ManagedPtr Thread)
- noThread :: Maybe Thread
- threadErrorQuark :: MonadIO m => m Word32
- threadExit :: MonadIO m => Ptr () -> m ()
- data ThreadJoinMethodInfo
- threadJoin :: MonadIO m => Thread -> m (Ptr ())
- data ThreadRefMethodInfo
- threadRef :: MonadIO m => Thread -> m Thread
- threadSelf :: MonadIO m => m Thread
- data ThreadUnrefMethodInfo
- threadUnref :: MonadIO m => Thread -> m ()
- threadYield :: MonadIO m => m ()
Exported types
Instances
| BoxedObject Thread Source # | |
| ((~) * info (ResolveThreadMethod t Thread), MethodInfo * info Thread p) => IsLabel t (Thread -> p) Source # | |
| ((~) * info (ResolveThreadMethod t Thread), MethodInfo * info Thread p) => IsLabelProxy t (Thread -> p) Source # | |
| HasAttributeList * Thread Source # | |
| ((~) * signature (m ()), MonadIO m) => MethodInfo * ThreadUnrefMethodInfo Thread signature Source # | |
| ((~) * signature (m Thread), MonadIO m) => MethodInfo * ThreadRefMethodInfo Thread signature Source # | |
| ((~) * signature (m (Ptr ())), MonadIO m) => MethodInfo * ThreadJoinMethodInfo Thread signature Source # | |
| type AttributeList Thread Source # | |
Methods
errorQuark
threadErrorQuark :: MonadIO m => m Word32 Source #
exit
threadExit :: MonadIO m => Ptr () -> m () Source #
join
data ThreadJoinMethodInfo Source #
ref
data ThreadRefMethodInfo Source #
self
threadSelf :: MonadIO m => m Thread Source #
unref
data ThreadUnrefMethodInfo Source #
threadUnref :: MonadIO m => Thread -> m () Source #
yield
threadYield :: MonadIO m => m () Source #