
18 Dec
2008
18 Dec
'08
4:57 a.m.
Jeremy Shaw wrote:
I have the following simple program:
import Control.Concurrent main = threadDelay (10^6) >> main
If I run it in GHCi it requires 2-5% of my CPU. If i compile it, it takes 0% of my CPU. It does not matter if I compile -O0, -O2, -threaded, it always uses 0% (which is good).
Is it expected that threadDelay should be really expensive in GHCi? Am I doing something wrong? Or should I file a bug?
Please file a bug. It could be that the idle time GC is running repeatedly rather than just once, or something like that. Cheers, Simon