Holumbus-Distribution- intra- and inter-program communicationSource codeContentsIndex
MaintainerStefan Schmidt (stefanschmidt@web.de)

Version : 0.1

Operations to start and stop threads which will not be killed when a regular exception occurs. In this case, the thread will continue working. Such a thread can only be killed by the stop-method. This whole thing is a wrapper around the normal lightweight thread functions.

The created threads execute a function in an infinite loop. This is the normal usecase for message dispatcher threads.

type Thread = MVar ThreadData
newThread :: IO Thread
setThreadDelay :: Int -> Thread -> IO ()
setThreadAction :: IO () -> Thread -> IO ()
setThreadErrorHandler :: IO () -> Thread -> IO ()
startThread :: Thread -> IO ()
stopThread :: Thread -> IO ()
type Thread = MVar ThreadDataSource
The thread datatype
newThread :: IO ThreadSource
Creates a new thread object. The thread will not be running.
setThreadDelay :: Int -> Thread -> IO ()Source
Sets the delay between two loop cycles. Default value: no delay.
setThreadAction :: IO () -> Thread -> IO ()Source
Sets the action function, which will be executed in each cycle
setThreadErrorHandler :: IO () -> Thread -> IO ()Source
Sets the error handler. It is activated, when the action function will raise an exception.
startThread :: Thread -> IO ()Source
Starts the thread.
stopThread :: Thread -> IO ()Source
Stops the thread. If the thread itself wants to stop from within the action function, the current cycle will be executed till the end. So statements after this function will still be executed.
Produced by Haddock version 2.4.2