Skip to content

Conversation

@stephentoub
Copy link
Member

TimerQueueTimer._canceled is only ever used when _associatedTimerQueue is held.

TimerQueueTimer._notifyWhenNoCallbacksRunning only ever transitions from null to non-null, always under a lock, and the only time it's used outside of a lock is just after that same thread validated the field was non-null while holding the lock.

Fixes #43972
cc: @kouvel, @tarekgh

TimerQueueTimer._canceled is only ever used when _associatedTimerQueue is held.

TimerQueueTimer._notifyWhenNoCallbacksRunning only ever transitions from null to non-null, always under a lock, and the only time it's used outside of a lock is just after that same thread validated the field was non-null while holding the lock.
@stephentoub stephentoub merged commit e2b37db into dotnet:master Nov 3, 2020
@stephentoub stephentoub deleted the timervolatile branch November 3, 2020 21:34
@ghost ghost locked as resolved and limited conversation to collaborators Dec 6, 2020
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.

TimerQueueTimer: potentially unnecessary volatile modifier on the private fields

5 participants