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 un subscription deadlock #116

Merged
merged 3 commits into from
Mar 22, 2024
Merged

Conversation

poonai
Copy link
Contributor

@poonai poonai commented Mar 22, 2024

The previous UnsubscribeAll methods leads to dead lock. Because Unsubscribe method call lock internally.

subscriber.unsubscribe = func() {

This PR will gather all the subscriber first in critical section then it unsubscribes in non critical section.

Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM

@VojtechVitek VojtechVitek merged commit 3877127 into master Mar 22, 2024
4 checks passed
@VojtechVitek VojtechVitek deleted the poonai/unsubscribe_deadlock branch March 22, 2024 14:37
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.

2 participants