Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Synopsis
- type Manager = Reaper [ Handle ] Handle
- type TimeoutAction = IO ()
- data Handle
- initialize :: Int -> IO Manager
- stopManager :: Manager -> IO ()
- killManager :: Manager -> IO ()
- withManager :: Int -> ( Manager -> IO a) -> IO a
- register :: Manager -> TimeoutAction -> IO Handle
- registerKillThread :: Manager -> TimeoutAction -> IO Handle
- tickle :: Handle -> IO ()
- cancel :: Handle -> IO ()
- pause :: Handle -> IO ()
- resume :: Handle -> IO ()
- data TimeoutThread = TimeoutThread
Types
type TimeoutAction = IO () Source #
An action to be performed on timeout.
Manager
initialize :: Int -> IO Manager Source #
Creating timeout manager which works every N micro seconds where N is the first argument.
stopManager :: Manager -> IO () Source #
Stopping timeout manager with onTimeout fired.
killManager :: Manager -> IO () Source #
Killing timeout manager immediately without firing onTimeout.
Call the inner function with a timeout manager.
Registration
registerKillThread :: Manager -> TimeoutAction -> IO Handle Source #
Registering a timeout action of killing this thread.
Control
tickle :: Handle -> IO () Source #
Setting the state to active.
Manager
turns active to inactive repeatedly.
cancel :: Handle -> IO () Source #
Setting the state to canceled.
Manager
eventually removes this without timeout action.
Exceptions
data TimeoutThread Source #
Instances
Show TimeoutThread Source # | |
Defined in System.TimeManager |
|
Exception TimeoutThread Source # | |
Defined in System.TimeManager |