A timeout manager
Moduletime-manager-0.3.2Haskell2010
System.TimeManager
Timeout manager. Since v0.3.0, timeout manager is a wrapper of
GHC System TimerManager.
Some caveats of using this package:
Only works for GHC
Only works with a threaded runtime
Users of older versions should check the current semantics.
Using 32-bit systems means the max timeout is
maxBound :: Int(2147483647) microseconds, which is less than 36 minutes.Using the same Handle in different threads might cause issues in some edge cases. (i.e. using cancel/pause in one thread, and resume in another)
- 4 types
- 15 values
- Packagetime-manager-0.3.2
- Exports19
- LanguageHaskell2010
- LicenceMIT
- SourceTimeManager.hs
Types
5 declarationsA manager whose timeout value is 0 (no callbacks are fired).
An action (callback) to be performed on timeout.
A handle used by a timeout manager.
Dummy Handle.
Manager
5 declarationsCreating timeout manager with a timeout value in microseconds.
Setting the timeout to zero or lower (<= 0) will produce a defaultManager.
Deprecated. This function does nothing since version 0.3.0
Obsoleted since version 0.3.0
Is now equivalent to pure ().
Deprecated. This function does nothing since version 0.3.0
Obsoleted since version 0.3.0
Is now equivalent to pure ().
Call the inner function with a timeout manager.
Deprecated. This function is the same as withManager since version 0.3.0
Call the inner function with a timeout manager. This is identical to withManager.
Registering a timeout action
2 declarationsRegistering a timeout action and unregister its handle when the body action is finished.
Registering a timeout action of killing this thread and unregister its handle when the body action is killed or finished.
Control timeout
3 declarationsExtending the timeout.
Careful: this does NOT reactivate an already paused Handle!
Low level
3 declarationsRegistering a timeout action.
Registering a timeout action of killing this thread. TimeoutThread is thrown to the thread which called this function on timeout. Catch TimeoutThread if you don't want to leak the asynchronous exception to GHC RTS.
Unregistering the timeout.
Exceptions
1 declarationThe asynchronous exception thrown if a thread is registered via registerKillThread.
Instances2Show, Exception
Show TimeoutThreadDefined in time-manager-0.3.2 · System.TimeManagerException TimeoutThreadDefined in time-manager-0.3.2 · System.TimeManager