RxHaskell-0.1: Reactive Extensions for Haskell

Safe HaskellSafe

Scheduler

Synopsis

Documentation

class Scheduler s whereSource

Represents a queue of IO actions which can be executed in FIFO order.

Methods

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.

Instances

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 SchedulerIO action and shows the result. This is for DEBUGGING PURPOSES ONLY.

data BackgroundScheduler Source

A scheduler which runs enqueued actions in a dedicated background thread.

newScheduler :: IO BackgroundSchedulerSource

Creates a new background scheduler.