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

Introduce Async publish and Async/Sync subscription #505

Open
wants to merge 13 commits into
base: event-aggregator
Choose a base branch
from

Conversation

adamhathcock
Copy link
Member

A lot of things are actually async as well as thread switching is async regardless of source being async or sync. This also matches async by default.

Besides Rhino and Tekla, some apps are using async void for event handing which isn't be a thing.

Requires #417

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 73.75415% with 79 lines in your changes missing coverage. Please review.

Project coverage is 13.73%. Comparing base (e9f13e2) to head (e75e5e0).

Files with missing lines Patch % Lines
...I3/Speckle.Connectors.DUI/Eventing/SpeckleEvent.cs 26.08% 32 Missing and 2 partials ⚠️
...I3/Speckle.Connectors.DUI/ContainerRegistration.cs 0.00% 11 Missing ⚠️
...le.Connectors.DUI/Eventing/OneTimeThreadedEvent.cs 66.66% 6 Missing and 2 partials ⚠️
...e.Connectors.DUI/Eventing/EventSubscriptionSync.cs 68.42% 5 Missing and 1 partial ⚠️
DUI3/Speckle.Connectors.DUI/Eventing/EventBase.cs 76.19% 5 Missing ⚠️
....Connectors.DUI/Eventing/EventSubscriptionAsync.cs 73.68% 5 Missing ⚠️
...Connectors.DUI/Eventing/WorkerEventSubscription.cs 0.00% 4 Missing ⚠️
...ectors.DUI/Eventing/MainThreadEventSubscription.cs 0.00% 3 Missing ⚠️
...UI3/Speckle.Connectors.DUI/Bridge/BrowserBridge.cs 0.00% 2 Missing ⚠️
...peckle.Connectors.DUI/Models/DocumentModelStore.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                 Coverage Diff                  @@
##           event-aggregator     #505      +/-   ##
====================================================
+ Coverage              8.81%   13.73%   +4.91%     
====================================================
  Files                   240      242       +2     
  Lines                  4526     4682     +156     
  Branches                587      575      -12     
====================================================
+ Hits                    399      643     +244     
+ Misses                 4111     4011     -100     
- Partials                 16       28      +12     

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

};
}

public virtual Task InvokeAction(Action<TPayload> action, TPayload argument)
Copy link
Member

Choose a reason for hiding this comment

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

Some of the overrides do not use the TopLevelException Handler

We were seeing a crash in Rhino on a OneTimeEventSubscriptionSync subscribe block

Copy link
Member

@JR-Morgan JR-Morgan left a comment

Choose a reason for hiding this comment

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

Rhino Document switch events are not clearing the UI.
@adamhathcock mentioned this regression may be existing already on dev.
I think it would be good to investigate, since we did at one point have this down.

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