Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak TimeProviderTaskExtensions handling of CreateTimer #85200

Merged
merged 1 commit into from
Apr 22, 2023

Conversation

stephentoub
Copy link
Member

Avoid the separate Timer.Change call by tweaking how cleanup happens.

Avoid the separate Timer.Change call by tweaking how cleanup happens.
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 22, 2023
@ghost ghost assigned stephentoub Apr 22, 2023
@ghost
Copy link

ghost commented Apr 22, 2023

Tagging subscribers to this area: @dotnet/area-system-datetime
See info in area-owners.md if you want to be subscribed.

Issue Details

Avoid the separate Timer.Change call by tweaking how cleanup happens.

Author: stephentoub
Assignees: stephentoub
Labels:

area-System.DateTime, needs-area-label

Milestone: -

@tarekgh tarekgh added this to the 8.0.0 milestone Apr 22, 2023
@tarekgh tarekgh removed the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 22, 2023
@stephentoub stephentoub merged commit be52876 into dotnet:main Apr 22, 2023
@stephentoub stephentoub deleted the tweakcreatetimer branch April 22, 2023 19:07
// that the registration is not left dangling.
// There are race conditions where the timer fires after we have attached the cancellation callback but before the
// registration is stored in state.Registration, or where cancellation is requested prior to the registration being
// stored into state.Registration, or where the timer could fire after it's been createdbut before it's been stored
Copy link
Member

Choose a reason for hiding this comment

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

nit, 'createdbut'

@ghost ghost locked as resolved and limited conversation to collaborators May 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.

3 participants