Hoogle Search

Within LTS Haskell 24.68 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. threadsAddTimeout :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

    gi-gdk3 GI.Gdk.Functions

    Sets a function to be called at regular intervals holding the GDK lock, with the given priority. The function is called repeatedly until it returns False, at which point the timeout is automatically destroyed and the function will not be called again. The notify function is called when the timeout is destroyed. The first call to the function will be at the end of the first interval. Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to “catch up” time lost in delays). This variant of timeoutAdd can be thought of a MT-safe version for GTK+ widgets for the following use case:

    C code

    static gboolean timeout_callback (gpointer data)
    {
    SomeWidget *self = data;
    
    // do stuff with self
    
    self->timeout_id = 0;
    
    return G_SOURCE_REMOVE;
    }
    
    static void some_widget_do_stuff_later (SomeWidget *self)
    {
    self->timeout_id = g_timeout_add (timeout_callback, self)
    }
    
    static void some_widget_finalize (GObject *object)
    {
    SomeWidget *self = SOME_WIDGET (object);
    
    if (self->timeout_id)
    g_source_remove (self->timeout_id);
    
    G_OBJECT_CLASS (parent_class)->finalize (object);
    }
    
    Since: 2.12

  2. threadsAddTimeoutSeconds :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

    gi-gdk3 GI.Gdk.Functions

    A variant of threadsAddTimeout with second-granularity. See timeoutAddSeconds for a discussion of why it is a good idea to use this function if you don’t need finer granularity. Since: 2.14

  3. threadsEnter :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  4. threadsInit :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  5. threadsLeave :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  6. OsThread :: ThreadAffinity

    ki Ki

    Bound to an OS thread.

  7. data Thread a

    ki Ki

    A thread.

    👉 Details

    • A thread's lifetime is delimited by the scope in which it was created.
    • The thread that creates a scope is considered the parent of all threads created within it.
    • If an exception is raised in a child thread, the child either propagates the exception to its parent (see fork), or returns the exception as a value (see forkTry).
    • All threads created within a scope are terminated when the scope closes.

  8. data ThreadAffinity

    ki Ki

    What, if anything, a thread is bound to.

  9. data ThreadOptions

    ki Ki

    • affinity The affinity of a thread. A thread can be unbound, bound to a specific capability, or bound to a specific OS thread.Default: Unbound
    • allocationLimit The maximum number of bytes a thread may allocate before it is delivered an AllocationLimitExceeded exception. If caught, the thread is allowed to allocate an additional 100kb (tunable with +RTS -xq) to perform any necessary cleanup actions; if exceeded, the thread is delivered another.Default: Nothing (no limit)
    • label The label of a thread, visible in the event log (+RTS -l).Default: "" (no label)
    • maskingState The masking state a thread is created in. To unmask, use unsafeUnmask.Default: Unmasked

  10. ThreadOptions :: ThreadAffinity -> Maybe ByteCount -> String -> MaskingState -> ThreadOptions

    ki Ki

    No documentation available.

Page 639 of many | Previous | Next