July 2013
Intermediate to advanced
322 pages
8h 43m
English
In this section, I’ve collected a few tricks and techniques that you might find useful when debugging Concurrent Haskell programs.
The threadStatus function (from GHC.Conc) returns the current
state of a thread:
threadStatus::ThreadId->IOThreadStatus
Here, ThreadStatus is defined as follows:
dataThreadStatus=ThreadRunning--![]()
|ThreadFinished--![]()
|ThreadBlockedBlockReason--![]()
|ThreadDied--![]()
deriving(Eq,Ord,Show)