Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

stephentoub
Copy link
Member

The recent change to introduce ITimer broke CTS.CancelAfter(Timeout.InfiniteTimeSpan). The TimeSpan's milliseconds were extracted as a uint but then ended up being cast to a long, such that rather than representing -1 milliseconds, it represented 4294967295 milliseconds. With the uint representation in Timer, Timeout.UnsignedInfinite needs to be special-cased.

aspnet/Benchmarks#1822

The recent change to introduce ITimer broke CTS.CancelAfter(Timeout.InfiniteTimeSpan).  The TimeSpan's milliseconds were extracted as a uint but then ended up being cast to a long, such that rather than representing -1 milliseconds, it represented 4294967295 milliseconds.  With the uint representation in Timer, Timeout.UnsignedInfinite needs to be special-cased.
@stephentoub stephentoub requested a review from tarekgh March 28, 2023 02:09
@ghost ghost assigned stephentoub Mar 28, 2023
@ghost
Copy link

ghost commented Mar 28, 2023

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details

The recent change to introduce ITimer broke CTS.CancelAfter(Timeout.InfiniteTimeSpan). The TimeSpan's milliseconds were extracted as a uint but then ended up being cast to a long, such that rather than representing -1 milliseconds, it represented 4294967295 milliseconds. With the uint representation in Timer, Timeout.UnsignedInfinite needs to be special-cased.

aspnet/Benchmarks#1822

Author: stephentoub
Assignees: stephentoub
Labels:

area-System.Threading

Milestone: -

Copy link
Contributor

@IDisposable IDisposable left a comment

Choose a reason for hiding this comment

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

:shipit:

@stephentoub stephentoub merged commit 3231e4f into dotnet:main Mar 28, 2023
@stephentoub stephentoub deleted the fixctstimeout branch March 28, 2023 10:24
@ghost ghost locked as resolved and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants