Ticket #3884 (closed bug: fixed)
|Reported by:||Roel van Dijk||Owned by:||simonmar|
|Type of failure:||None/Unknown||Difficulty:|
|Test Case:||Blocked By:|
The documentation for killThread states that:
killThread terminates the given thread (GHC only).
However, this is not unconditionally true. It is possible to create a thread that is unkillable. The following fails to terminate:
module Main where import Control.Concurrent ( forkIO, killThread ) import Control.Exception ( block ) main :: IO () main = do tid <- block $ forkIO $ let x = x in x killThread tid
This is not unexpected, but could be made a bit clearer in the documentation. Perhaps something like: "killThread attempts to terminate the given thread (GHC only)".