This package provides module to let you run actions with resettable timeouts
(i.e. System.TimeManager) and run actions that will make sure that all
threads forked with the given ThreadManager will be killed when the action
finishes.
WARNINGS
Since version 0.3.0, the timeout manager relies on GHC internals.
This change also means that using this package only works with the threadedruntime. The moment a timeout is registered on a non-threaded runtime, an
exception will be thrown.
Changes
ChangeLog for time-manager
0.3.1.1
Added README.md file and improved documentation of modules and functions.
#1057
resume now acts as a tickle if the Handle isn’t paused.
This is the same behaviour as before version 0.3.0.
registerKillThread now throws the TimeoutThread in a separate
thread, so as to not block the GHC’s System TimerManager.
This does mean that TimeoutThread exceptions could technically
be thrown “out of order”, but they will be more prompt.
New architecture. The backend is switched from the designated thread
to GHC’s System TimerManager. From this version, this library is
just wrapper APIs of GHC’s System TimerManager. Unlike v0.2 or
earlier, callbacks are executed at the exact time. System
TimerManager uses a PSQ (a tree) while v0.2 or earlier uses a list.
So, this version hopefully scales better.
Deprecated functions: stopManager, killManager and withManager'.
tickle sets the specified timeout from now.
pause is now identical to cancel.
resume is now re-registration of timeout.
The signature of withHandle is changed.
0.2.4
Providing isAllGone.
Providing emptyHandle.
0.2.3
Exporting defaultManager.
0.2.2
initialize with non positive integer creates a time manager
which does not maintain timeout.
#1017