Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Structs.IOSchedulerJob
Description
Opaque class for defining and scheduling IO jobs.
Synopsis
- newtype IOSchedulerJob = IOSchedulerJob (ManagedPtr IOSchedulerJob)
- type family ResolveIOSchedulerJobMethod (t :: Symbol) o where ...
- data IOSchedulerJobSendToMainloopMethodInfo
- iOSchedulerJobSendToMainloop :: (HasCallStack, MonadIO m) => IOSchedulerJob -> SourceFunc -> m Bool
- data IOSchedulerJobSendToMainloopAsyncMethodInfo
- iOSchedulerJobSendToMainloopAsync :: (HasCallStack, MonadIO m) => IOSchedulerJob -> SourceFunc -> m ()
Exported types
newtype IOSchedulerJob Source #
Memory-managed wrapper type.
Constructors
IOSchedulerJob (ManagedPtr IOSchedulerJob) |
Instances
Methods
Click to display all available methods, including inherited ones
type family ResolveIOSchedulerJobMethod (t :: Symbol) o where ... Source #
Equations
ResolveIOSchedulerJobMethod "sendToMainloop" o = IOSchedulerJobSendToMainloopMethodInfo | |
ResolveIOSchedulerJobMethod "sendToMainloopAsync" o = IOSchedulerJobSendToMainloopAsyncMethodInfo | |
ResolveIOSchedulerJobMethod l o = MethodResolutionFailed l o :: Type |
sendToMainloop
data IOSchedulerJobSendToMainloopMethodInfo Source #
Instances
(signature ~ (SourceFunc -> m Bool), MonadIO m) => OverloadedMethod IOSchedulerJobSendToMainloopMethodInfo IOSchedulerJob signature Source # | |
Defined in GI.Gio.Structs.IOSchedulerJob Methods overloadedMethod :: IOSchedulerJob -> signature # | |
OverloadedMethodInfo IOSchedulerJobSendToMainloopMethodInfo IOSchedulerJob Source # | |
Defined in GI.Gio.Structs.IOSchedulerJob Methods |
iOSchedulerJobSendToMainloop Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IOSchedulerJob |
|
-> SourceFunc |
|
-> m Bool | Returns: The return value of |
Deprecated: (Since version 2.36)Use g_main_context_invoke()
.
Used from an I/O job to send a callback to be run in the thread that the job was started from, waiting for the result (and thus blocking the I/O job).
sendToMainloopAsync
data IOSchedulerJobSendToMainloopAsyncMethodInfo Source #
Instances
(signature ~ (SourceFunc -> m ()), MonadIO m) => OverloadedMethod IOSchedulerJobSendToMainloopAsyncMethodInfo IOSchedulerJob signature Source # | |
Defined in GI.Gio.Structs.IOSchedulerJob Methods overloadedMethod :: IOSchedulerJob -> signature # | |
OverloadedMethodInfo IOSchedulerJobSendToMainloopAsyncMethodInfo IOSchedulerJob Source # | |
Defined in GI.Gio.Structs.IOSchedulerJob Methods |
iOSchedulerJobSendToMainloopAsync Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> IOSchedulerJob |
|
-> SourceFunc |
|
-> m () |
Deprecated: (Since version 2.36)Use g_main_context_invoke()
.
Used from an I/O job to send a callback to be run asynchronously in the thread that the job was started from. The callback will be run when the main loop is available, but at that time the I/O job might have finished. The return value from the callback is ignored.
Note that if you are passing the userData
from ioSchedulerPushJob
on to this function you have to ensure that it is not freed before
func
is called, either by passing Nothing
as notify
to
ioSchedulerPushJob
or by using refcounting for userData
.