Skip to content

Conversation

@StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Oct 14, 2020

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:

  • Move _To_absolute_time up to <thread> so we can fix 3 more lines (in <thread> and <shared_mutex>).
  • _To_absolute_time is a template, so we don't need inline.
  • The return type needs special attention - we want to return the same type as now() + _Rel_time (the expression we're replacing and clamping). For example, this makes a difference when _Rel_time has a double representation.
  • Extract constexpr _Zero to avoid a function call in debug mode.
  • Similarly, upgrade _Forever to constexpr.

CaseyCarter and others added 7 commits October 13, 2020 09:22
... without overflow by saturating on the high end and clipping to `now`.
* This is a template, so we don't need inline.
* Use auto for _Abs_time - its type is unsurprising.
* Extract constexpr _Zero to avoid a function call in debug mode.
* Similarly, upgrade _Forever to constexpr.
@StephanTLavavej StephanTLavavej added bug Something isn't working infrastructure Related to repository automation labels Oct 14, 2020
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner October 14, 2020 07:40
Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Thanks @MattStephanson and @CaseyCarter

@StephanTLavavej StephanTLavavej self-assigned this Oct 17, 2020
@StephanTLavavej StephanTLavavej merged commit 830beda into microsoft:master Oct 17, 2020
@StephanTLavavej StephanTLavavej deleted the vs-2019-16.8-p4 branch October 17, 2020 06:14
@StephanTLavavej
Copy link
Member Author

Thanks again @MattStephanson and @CaseyCarter! 😺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working infrastructure Related to repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sporadic failure of P0660R10_jthread_and_cv_any

5 participants