It often happens to me when debugging or playing around in GHCi that I happen to know the actual ThreadId
number (for example from using Debug.Trace
), but that's all I have.
The problem is that all thread APIs, such as killThread
require a ThreadId
and not an Int
.
I've tried Hoogle but came out empty. Is there a way to do this? I'm concerned mostly with debugging, so I don't mind if it's a nasty hack or if it's through a GHC-only library.