Hoogle Search

Within LTS Haskell 24.69 (ghc-9.10.3)

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

  1. taskSetCheckCancellable :: (HasCallStack, MonadIO m, IsTask a) => a -> Bool -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets or clears task's check-cancellable flag. If this is True (the default), then taskPropagatePointer, etc, and taskHadError will check the task's Cancellable first, and if it has been cancelled, then they will consider the task to have returned an "Operation was cancelled" error (IOErrorEnumCancelled), regardless of any other error or return value the task may have had. If checkCancellable is False, then the Task will not check the cancellable itself, and it is up to task's owner to do this (eg, via taskReturnErrorIfCancelled). If you are using taskSetReturnOnCancel as well, then you must leave check-cancellable set True. Since: 2.36

  2. taskSetName :: (HasCallStack, MonadIO m, IsTask a) => a -> Maybe Text -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets task’s name, used in debugging and profiling. The name defaults to Nothing. The task name should describe in a human readable way what the task does. For example, ‘Open file’ or ‘Connect to network host’. It is used to set the name of the Source used for idle completion of the task. This function may only be called before the task is first used in a thread other than the one it was constructed in. It is called automatically by taskSetSourceTag if not called already. Since: 2.60

  3. taskSetPriority :: (HasCallStack, MonadIO m, IsTask a) => a -> Int32 -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets task's priority. If you do not call this, it will default to PRIORITY_DEFAULT. This will affect the priority of GSources created with g_task_attach_source() and the scheduling of tasks run in threads, and can also be explicitly retrieved later via taskGetPriority. Since: 2.36

  4. taskSetReturnOnCancel :: (HasCallStack, MonadIO m, IsTask a) => a -> Bool -> m Bool

    gi-gio GI.Gio.Objects.Task

    Sets or clears task's return-on-cancel flag. This is only meaningful for tasks run via taskRunInThread or taskRunInThreadSync. If returnOnCancel is True, then cancelling task's Cancellable will immediately cause it to return, as though the task's TaskThreadFunc had called taskReturnErrorIfCancelled and then returned. This allows you to create a cancellable wrapper around an uninterruptible function. The TaskThreadFunc just needs to be careful that it does not modify any externally-visible state after it has been cancelled. To do that, the thread should call taskSetReturnOnCancel again to (atomically) set return-on-cancel False before making externally-visible changes; if the task gets cancelled before the return-on-cancel flag could be changed, taskSetReturnOnCancel will indicate this by returning False. You can disable and re-enable this flag multiple times if you wish. If the task's Cancellable is cancelled while return-on-cancel is False, then calling taskSetReturnOnCancel to set it True again will cause the task to be cancelled at that point. If the task's Cancellable is already cancelled before you call taskRunInThread/taskRunInThreadSync, then the TaskThreadFunc will still be run (for consistency), but the task will also be completed right away. Since: 2.36

  5. taskSetSourceTag :: (HasCallStack, MonadIO m, IsTask a) => a -> Ptr () -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets task's source tag. You can use this to tag a task return value with a particular pointer (usually a pointer to the function doing the tagging) and then later check it using taskGetSourceTag (or asyncResultIsTagged) in the task's "finish" function, to figure out if the response came from a particular place. A macro wrapper around this function will automatically set the task’s name to the string form of sourceTag if it’s not already set, for convenience. Since: 2.36

  6. taskSetStaticName :: (HasCallStack, MonadIO m, IsTask a) => a -> Maybe Text -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets task’s name, used in debugging and profiling. This is a variant of taskSetName that avoids copying name. Since: 2.76

  7. taskSetTaskData :: (HasCallStack, MonadIO m, IsTask a) => a -> Ptr () -> Maybe DestroyNotify -> m ()

    gi-gio GI.Gio.Objects.Task

    Sets task's task data (freeing the existing task data, if any). Since: 2.36

  8. tcpConnectionSetGracefulDisconnect :: (HasCallStack, MonadIO m, IsTcpConnection a) => a -> Bool -> m ()

    gi-gio GI.Gio.Objects.TcpConnection

    This enables graceful disconnects on close. A graceful disconnect means that we signal the receiving end that the connection is terminated and wait for it to close the connection before closing the connection. A graceful disconnect means that we can be sure that we successfully sent all the outstanding data to the other end, or get an error reported. However, it also means we have to wait for all the data to reach the other side and for it to acknowledge this by closing the socket, which may take a while. For this reason it is disabled by default. Since: 2.22

  9. testDBusUnset :: (HasCallStack, MonadIO m) => m ()

    gi-gio GI.Gio.Objects.TestDBus

    Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test won't use user's session bus. This is useful for unit tests that want to verify behaviour when no session bus is running. It is not necessary to call this if unit test already calls testDBusUp before acquiring the session bus.

  10. tlsConnectionSetAdvertisedProtocols :: (HasCallStack, MonadIO m, IsTlsConnection a) => a -> Maybe [Text] -> m ()

    gi-gio GI.Gio.Objects.TlsConnection

    Sets the list of application-layer protocols to advertise that the caller is willing to speak on this connection. The Application-Layer Protocol Negotiation (ALPN) extension will be used to negotiate a compatible protocol with the peer; use tlsConnectionGetNegotiatedProtocol to find the negotiated protocol after the handshake. Specifying Nothing for the the value of protocols will disable ALPN negotiation. See IANA TLS ALPN Protocol IDs for a list of registered protocol IDs. Since: 2.60

Page 1251 of many | Previous | Next