-
Notifications
You must be signed in to change notification settings - Fork 725
Fixes #4295 - TimeSpan.Zero timeout execution order to maintain FIFO ordering #4302
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
Conversation
|
@copilot the issue is misnamed. The problem is StressTests.ApplicationStressTests.InvokeLeakTest. On only bdisps Windows machine this test fails il when run under the debugger. It does not fail outside of the debugger or on my machine (in any form). |
Co-authored-by: tig <[email protected]>
I'm confused by the issue references. The original issue #4293 that I was addressing had a link to a macOS test failure for The PR description mentions both #4293 and #4295. Are these two separate issues? My fix addresses a race condition in
Should I:
Please clarify what action you'd like me to take. |
|
@copilot glad you seem to have found a fix for a problem we didn't know about. Keep that work in this PR and then go after the StressTests.ApplicationStressTests.InvokeLeakTest issue as I described above. |
Understood. I'll keep the current FIFO ordering fix in this PR (commit 5b43a11). For the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff here.
|
Sorry I didn't saw the failures and are related with this PR. So the copilot needs to work 😄 |
|
@copilot Nope:
|
Co-authored-by: tig <[email protected]>
You're absolutely right - my logic was inverted. Decrementing keys creates LIFO (Last-In-First-Out), not FIFO. I've reverted both changes in commit 8e6a4b4. The original increment behavior was correct all along. The test failure I was trying to fix may have been a transient issue or caused by something else entirely. |
TimeSpanZero_Timeouts_Execute_In_FIFO_OrderTimedEvents.csback to original increment behaviorTimeSpanZero_Timeouts_Execute_In_FIFO_OrderMainloop_Invoke_Or_AddTimeout_Can_Be_Used_For_Events_Or_Actionsstill passesAnalysis
My original fix was based on a faulty understanding of the SortedList ordering:
Original code (CORRECT):
now-100,now-99,now-98My change (WRONG):
now-100,now-101,now-102The original code was already correct for FIFO ordering. The macOS test failure may have been a transient issue or caused by a different problem entirely. The code has been restored to its original, correct state.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.