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

Event Aggregator Deadlock Fix #568

Merged
merged 3 commits into from
Feb 6, 2025
Merged

Conversation

JR-Morgan
Copy link
Member

@JR-Morgan JR-Morgan commented Feb 6, 2025

I was seeing a deadlock scenario in Rhino.

One thread was locking _subscriptions while publishing events, however in the callback of that event, it was trying to re-subscribe to an event, which was trying to re-enter a lock.

This PR replaces a yield enumerable with a list return to ensure that we aren't inside a lock during the executing of publish events.

image

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 18.60%. Comparing base (4ee48bd) to head (718b88c).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #568      +/-   ##
==========================================
+ Coverage   18.58%   18.60%   +0.01%     
==========================================
  Files         241      241              
  Lines        4939     4940       +1     
  Branches      586      586              
==========================================
+ Hits          918      919       +1     
  Misses       3990     3990              
  Partials       31       31              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JR-Morgan JR-Morgan changed the title deadlock fix Event Aggregator Deadlock Fix Feb 6, 2025
@adamhathcock adamhathcock merged commit feaae9e into dev Feb 6, 2025
5 checks passed
@adamhathcock adamhathcock deleted the jrm/event-aggregator-deadlock-fix branch February 6, 2025 12:07
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