[Haskell-cafe] Resolution of time for threadDelay / registerDelay

Neil Davies semanticphilosopher at googlemail.com
Mon Jan 22 15:13:08 EST 2007

The GHC concurrency run time currently forces all delays to be
resolved to 1/50th of second - independent of any of the run time
settings (e.g. -V flag) - with rounding to the next 1/50th of second.

This means that, in practice, the "jitter" in the time that a thread
wakes as compared with can be rather large - 20ms to 30ms; 20ms from
the GHC base library rounding along with a "jiffy" from the operating

As far as I can see there is no reason why there should be any
quantization of delay times - the implementation creates an ordered
list of times which could be at any resolution (say microseconds) -
this would reduce the "jitter" to that of an operating system jiffy.



More information about the Haskell-Cafe mailing list