Safe Haskell | Safe |
---|
- class Scheduler s where
- schedule :: s -> SchedulerIO s () -> IO Disposable
- data SchedulerIO s a
- data BackgroundScheduler
- newScheduler :: IO BackgroundScheduler
Documentation
Represents a queue of IO
actions which can be executed in FIFO order.
schedule :: s -> SchedulerIO s () -> IO DisposableSource
Schedules an action on the scheduler. Returns a disposable which can be used to cancel it.
data SchedulerIO s a Source
An IO
computation that must be performed in a scheduler of type s
.
Scheduler s => Monad (SchedulerIO s) | |
Functor (SchedulerIO s) | |
Scheduler s => Applicative (SchedulerIO s) | |
Scheduler s => MonadIO (SchedulerIO s) | |
(Scheduler s, Show v) => Show (SchedulerIO s v) | Unsafely executes a |
data BackgroundScheduler Source
A scheduler which runs enqueued actions in a dedicated background thread.
newScheduler :: IO BackgroundSchedulerSource
Creates a new background scheduler.