threadDelay appears to use excessive CPU in GHCi
|Reported by:||JeremyShaw||Owned by:|
|Type of failure:||Test Case:|
|Related Tickets:||Differential Rev(s):|
I have the following simple program:
import Control.Concurrent main = threadDelay (106) >> 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).
I have only tested this under Linux (Ubuntu Hardy) and GHC 6.8.3 on one machine.