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

Fix Post on disposed mailbox (#17849) #17922

Merged
merged 5 commits into from
Oct 30, 2024
Merged

Conversation

majocha
Copy link
Contributor

@majocha majocha commented Oct 24, 2024

Fixes #17849

pulse disposal is under syncRoot lock now. Nullifying it ensures there is no attempt to set the disposed wait handle.

The overall result is that Post on disposed mailbox does not throw unless the mailbox was created with isThrowExceptionAfterDisposed = true. (See #13036)

The issue has minimal impact as certain rare conditions must be fulfilled to trigger the bug (#17849 (comment)).
This fix does not change the general behavior which is that a disposed mailbox should stop processing messages and (I presume) should not throw unless isThrowExceptionAfterDisposed is set.

@majocha majocha requested a review from a team as a code owner October 24, 2024 20:18
Copy link
Contributor

github-actions bot commented Oct 24, 2024

❗ Release notes required


✅ Found changes and release notes in following paths:

Change path Release notes path Description
src/FSharp.Core docs/release-notes/.FSharp.Core/9.0.200.md

@psfinaki
Copy link
Member

Do I get it right that this fixes this bug? If so, I guess the minimal repro your have there can serve as a test?

Copy link
Member

@psfinaki psfinaki left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Internal exception surfacing when calling Post on disposed MailBoxProcessor
3 participants