Manager to manage the thread and the timer.
Moduletime-manager-0.2.3Haskell2010
System.ThreadManager
A thread manager including a time manager. The manager has responsibility to kill managed threads.
- 4 types
- 12 values
- Packagetime-manager-0.2.3
- Exports16
- LanguageHaskell2010
- LicenceMIT
- SourceThreadManager.hs
Starting a thread manager.
Its action is initially set to 'return ()' and should be set
by setAction. This allows that the action can include
the manager itself.
Stopping the manager.
The action is run in the scope of an exception handler that catches all exceptions (including asynchronous ones); this allows the cleanup handler to cleanup in all circumstances. If an exception is caught, it is rethrown after the cleanup is complete.
An exception used internally to kill a managed thread.
Constructors
Instances2Show, Exception
Show KilledByThreadManagerDefined in time-manager-0.2.3 · System.ThreadManagerException KilledByThreadManagerDefined in time-manager-0.2.3 · System.ThreadManager
Fork
5 declarationsFork a managed thread.
This guarantees that the thread ID is added to the manager's queue before the thread starts, and is removed again when the thread terminates (normally or abnormally).
Fork a managed thread with a cleanup function.
Like forkManaged, but run action with exceptions masked
Fork a managed thread with a handle created by a timeout manager.
Fork a managed thread with a handle created by a timeout manager and with a cleanup function.
Synchronization
1 declarationWait until all managed thread are finished.
Re-exports
6 declarationsA timeout manager
A handle used by a timeout manager.
Setting the state to active. Manager turns active to inactive repeatedly.
Setting the state to paused. Manager does not change the value.
Setting the paused state to active. This is an alias to tickle.