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

Aync first Event Aggregator #496

Closed
nigel-sampson opened this issue Dec 13, 2017 · 0 comments
Closed

Aync first Event Aggregator #496

nigel-sampson opened this issue Dec 13, 2017 · 0 comments
Milestone

Comments

@nigel-sampson
Copy link
Contributor

nigel-sampson commented Dec 13, 2017

As part of 4.0 we're moving to async first across all major interfaces. This issue summarizes the work required for the EventAggregator.

I want to approach this in few steps all of which are breaking changes.

  1. Move from three interfaces IHandle<T>, IHandleWithCoroutine<T> and IHandleWithTask<T> to a single interface IHandle<T> that supports Task based subscription:
Task HandleAsync(TMessage message, CancellationToken cancellationToken);
  1. Publish PublishAsync will return a Task that completes when all handlers have finished and will take a cancellation token.
  2. Handlers will be called in parallel. This will be extensible.
  3. The Publish overloads of Current Thread, Background Thread and UI Thread will be simplified (we won't need the various overloads of UI thread).
  4. Subscribe will be changed to support similar semantics SubscribeOnBackgroundThread etc.

This rolls up issues covered by #409 and #416.

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