#5865: threadDelay is disrupted by system clock changes
---------------------------------+------------------------------------------
Reporter: joeyadams | Owner: pcapriotti
Type: bug | Status: patch
Priority: high | Milestone: 7.4.2
Component: Runtime System | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Incorrect result at runtime
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonmar):
I would use `cas()` to update the value of `previous_count`, checking that
it still has the value first read, and re-do the `GetTickCount()` call
otherwise.
This does seem a bit like overkill though, and virtually impossible to
test properly. I'm tempted to just drop the use of `previous_count`
altogether, and accept that the counter wraps after 49 days on systems
where QPC doesn't work (which are in the minority, and likely to get even
more rare over time).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5865#comment:20>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs