diff options
author | Ben Gamari <ben@smart-cactus.org> | 2021-07-26 11:01:11 -0700 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-08-02 04:14:25 -0400 |
commit | f454c0ea2e7de32786635a987885706fcd7cb01a (patch) | |
tree | efa5034ef77674b767b8d33401f5373e908421f5 /INSTALL.md | |
parent | 2e0f4ca128d17a7161fa41ee9e82315a1cddffb7 (diff) | |
download | haskell-f454c0ea2e7de32786635a987885706fcd7cb01a.tar.gz |
rts/OSThreads: Fix reference clock of timedWaitCondition
Previously `timedWaitCondition` assumed that timeouts were referenced
against `CLOCK_MONOTONIC`. This is wrong; by default
`pthread_cond_timedwait` references against `CLOCK_REALTIME`, although
this can be overridden using `pthread_condattr_setclock`.
Fix this and add support for using `CLOCK_MONOTONIC` whenever possible
as it is more robust against system time changes and is likely cheaper
to query. Unfortunately, this is complicated by the fact that older
versions of Darwin did not provide `clock_gettime`, which means we also
need to introduce a fallback path using `gettimeofday`.
Fixes #20144.
Diffstat (limited to 'INSTALL.md')
0 files changed, 0 insertions, 0 deletions