Skip to content

Conversation

kkokosa
Copy link
Contributor

@kkokosa kkokosa commented Jun 15, 2020

Summary

Currently the snippet for Thread.Priority property does not work in Release mode. The flag loopSwitch is enregistered and not shared between threads. The simplest solution is to make it volatile.

@dotnet-bot dotnet-bot added this to the June 2020 milestone Jun 15, 2020
@gewarren gewarren requested a review from kouvel June 22, 2020 21:36
@kouvel
Copy link
Contributor

kouvel commented Jun 23, 2020

Nice catch, thanks for fixing. Just a small suggestion but LGTM.

@gewarren
Copy link
Contributor

@kkokosa Do you want to incorporate the suggestion so we can merge this?

…g.ThreadPriority/cs/Example1.cs

Co-authored-by: Koundinya Veluri <kouvel@users.noreply.github.com>
@gewarren gewarren merged commit 4e05b76 into dotnet:master Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants