VS 2019 16.8 Preview 4, Python 3.9.0, absolute time fix #1371
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the CI infrastructure to VS 2019 16.8 Preview 4 and Python 3.9.0.
This also fixes #1365, a sporadic test failure that I encountered after upgrading my local machine to Python 3.9.0. (I'm still not sure if they're actually related, but I've bundled these changes together since they affect different files and are relatively small.) @MattStephanson found the root cause and @CaseyCarter developed a fix: convert relative time to absolute time, clamped between now and forever. I then made the following changes:
_To_absolute_timeup to<thread>so we can fix 3 more lines (in<thread>and<shared_mutex>)._To_absolute_timeis atemplate, so we don't needinline.now() + _Rel_time(the expression we're replacing and clamping). For example, this makes a difference when_Rel_timehas adoublerepresentation.constexpr _Zeroto avoid a function call in debug mode._Forevertoconstexpr.