killThread -package:thread-hierarchy
killThread raises the
ThreadKilled exception in the
given thread (GHC only).
killThread tid = throwTo tid ThreadKilled
Raise the
ThreadKilled exception in the target thread. Note
that if the thread is prepared to catch this exception, it won't
actually kill it.
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.
Registering a timeout action of killing this thread and unregister its
handle when the body action is killed or finished.