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

Channel.Closed event is not deterministic #319

Closed
drieseng opened this issue Oct 12, 2017 · 0 comments
Closed

Channel.Closed event is not deterministic #319

drieseng opened this issue Oct 12, 2017 · 0 comments
Assignees

Comments

@drieseng
Copy link
Member

We currently fire Closed event from OnClose() before we invoke the Close() method.

This is done to avoid a deadlock when Close() or Dispose() is invoked on the channel from an eventhandler for the Closed event.

As it is right now, the Closed event is not garanteed to fire before the channel is disposed, and is not garanteed to fire after we finish closing the channel.

We should make sure to fire the Closed event once the channel is closed on both ends, and before the Close() or Dispose() method completes.

@drieseng drieseng self-assigned this Oct 12, 2017
drieseng added a commit that referenced this issue Oct 12, 2017
* ensure the channel is closed at both ends before we raise this event
* ensure we raise the event before the channel is disposed

Fixes issue #319.
@drieseng drieseng added this to the 2017.0.0-beta1 milestone Oct 16, 2017
@drieseng drieseng modified the milestones: 2017.0.0-beta1, 2020.0.0-beta1 Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant