jobqueue-0.1.6: A job queue library

Safe HaskellNone
LanguageHaskell98

Network.JobQueue.Job

Synopsis

Documentation

data Job a Source

Job control block Job consists of State, Unit, CTime, OnTime, Id, Group, and Priority.

  • State - takes one of 5 states (initialized, runnable, running, aborted and finished)
  • Unit - an instance of Unit class, which is specified by type parameter of Job data type
  • CTime - creation time
  • OnTime - the time at which this job starts
  • Id - Identifier of this job
  • Group - Group ID of this job
  • Priority - the priority of this job

Constructors

StopTheWorld 

Instances

Eq a => Eq (Job a) Source 
Read a => Read (Job a) Source 
Show a => Show (Job a) Source 

buildActionState :: (Env e, Unit a) => JobM e a () -> IO (JobActionState e a) Source

process :: (Aux e, Env e, Unit a) => (a -> ActionM e a ()) -> JobM e a () Source

Declare a function which accepts a unit and execute the action of it if possible.

createJob :: Unit a => JobState -> a -> IO (Job a) Source

printJob :: Unit a => Job a -> IO () Source