Replies: 2 comments
-
This is not a forum for code review. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Generally speaking, you want to avoid polling when possible, in preference for sending events of some sort from triggering code (like having whatever sets the value also set the completed task or flipping a ManualResetEvent). If you persist in going down this path, C++ has something known as condition variables that perform this function, so I wouldn't be too surprised if you could find a NuGet package for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Digging in and cleaning my "old" code, I found a code snippet that at first glance looks "ok" but I'm not sure if it is the correct the way to do this in .net 8-9
The goal of this code is to wait until a value or reference change achieves a condition or a cancellation is requested.
Is
Ref
private class needed? How can be improved, looking to new .net elements included?Beta Was this translation helpful? Give feedback.
All reactions