diff options
| author | Travis Martin <phasemage@live.com> | 2021-10-10 21:57:26 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-12-09 18:34:17 -0700 |
| commit | 72ee042ab0c6dc823f839bca6d1511a144f62b49 (patch) | |
| tree | 1ff98cf9f458f97a897758441e9f64338e5e2220 /lib/std/Thread | |
| parent | 01cb0bdb8317484cab0f8ee3896c981c851d3bb1 (diff) | |
| download | zig-72ee042ab0c6dc823f839bca6d1511a144f62b49.tar.gz zig-72ee042ab0c6dc823f839bca6d1511a144f62b49.zip | |
Cache: fix two issues with isProblematicTimestamp
1. It was looking for trailing zero bits when it should be looking for
trailing decimal zeros.
2. Clock timestamps had more precision than the actual file timestamps
The fix is to grab a timestamp from a 'just now changed' temp file.
This timestamp is "problematic". Any file timestamp greater than or equal
to this timestamp is considered problematic. File timestamps **prior** to
this **can** be trusted.
Downside is that it causes a disk I/O to write to and then read the
timestamp from this file ~1ms on my system. This is partially mitigated by
keeping track of the most recent problematic timestamp, and only checking
for a new problematic timestamp when checking a timestamp that is equal to
or larger than the last problematic one.
This fixes #6082.
Diffstat (limited to 'lib/std/Thread')
0 files changed, 0 insertions, 0 deletions
