Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

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

  1. inputStreamReadBytesAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

    gi-gio GI.Gio.Objects.InputStream

    Request an asynchronous read of count bytes from the stream into a new Bytes. When the operation is finished callback will be called. You can then call inputStreamReadBytesFinish to get the result of the operation. During an async request no other sync and async calls are allowed on stream, and will result in IOErrorEnumPending errors. A value of count larger than G_MAXSSIZE will cause a IOErrorEnumInvalidArgument error. On success, the new Bytes will be passed to the callback. It is not an error if this is smaller than the requested size, as it can happen e.g. near the end of a file, but generally we try to read as many bytes as requested. Zero is returned on end of file (or if count is zero), but never otherwise. Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT. Since: 2.34

  2. inputStreamReadBytesFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Bytes

    gi-gio GI.Gio.Objects.InputStream

    Finishes an asynchronous stream read-into-tBytes operation. Since: 2.34

  3. inputStreamReadFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m Int64

    gi-gio GI.Gio.Objects.InputStream

    Finishes an asynchronous stream read operation.

  4. taskRunInThread :: (HasCallStack, MonadIO m, IsTask a) => a -> TaskThreadFunc -> m ()

    gi-gio GI.Gio.Objects.Task

    Runs taskFunc in another thread. When taskFunc returns, task's AsyncReadyCallback will be invoked in task's MainContext. This takes a ref on task until the task completes. See TaskThreadFunc for more details about how taskFunc is handled. Although GLib currently rate-limits the tasks queued via taskRunInThread, you should not assume that it will always do this. If you have a very large number of tasks to run (several tens of tasks), but don't want them to all run at once, you should only queue a limited number of them (around ten) at a time. Be aware that if your task depends on other tasks to complete, use of this function could lead to a livelock if the other tasks also use this function and enough of them (around 10) execute in a dependency chain, as that will exhaust the thread pool. If this situation is possible, consider using a separate worker thread or thread pool explicitly, rather than using taskRunInThread. Since: 2.36

  5. taskRunInThreadSync :: (HasCallStack, MonadIO m, IsTask a) => a -> TaskThreadFunc -> m ()

    gi-gio GI.Gio.Objects.Task

    Runs taskFunc in another thread, and waits for it to return or be cancelled. You can use taskPropagatePointer, etc, afterward to get the result of taskFunc. See TaskThreadFunc for more details about how taskFunc is handled. Normally this is used with tasks created with a Nothing callback, but note that even if the task does have a callback, it will not be invoked when taskFunc returns. Task:completed will be set to True just before this function returns. Although GLib currently rate-limits the tasks queued via taskRunInThreadSync, you should not assume that it will always do this. If you have a very large number of tasks to run, but don't want them to all run at once, you should only queue a limited number of them at a time. Since: 2.36

  6. module GI.Gio.Objects.ThreadedResolver

    ThreadedResolver is an implementation of Resolver which calls the libc lookup functions in threads to allow them to run asynchronously. Since: 2.20

  7. class (GObject o, IsDescendantOf ThreadedResolver o) => IsThreadedResolver o

    gi-gio GI.Gio.Objects.ThreadedResolver

    Type class for types which can be safely cast to ThreadedResolver, for instance with toThreadedResolver.

  8. newtype ThreadedResolver

    gi-gio GI.Gio.Objects.ThreadedResolver

    Memory-managed wrapper type.

  9. ThreadedResolver :: ManagedPtr ThreadedResolver -> ThreadedResolver

    gi-gio GI.Gio.Objects.ThreadedResolver

    No documentation available.

  10. toThreadedResolver :: (MonadIO m, IsThreadedResolver o) => o -> m ThreadedResolver

    gi-gio GI.Gio.Objects.ThreadedResolver

    Cast to ThreadedResolver, for types for which this is known to be safe. For general casts, use castTo.

Page 511 of many | Previous | Next