-
Notifications
You must be signed in to change notification settings - Fork 747
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
[WIP] Asynchronous Rx implementation #435
Conversation
Hi, great job, want to use it in our project. Can you answer, how long time acceptance of PR can take? |
Any news on this? |
Merging this initial prototype as-is, with future development planned after |
@bartdesmet Is the develop branch part of a nightly? It seems https://github.com/Reactive-Extensions/Rx.NET/tree/develop/AsyncRx.NET will be a new package? |
@bartdesmet would you be able to provide any news on the development of these set of features and/or potentially the progress of opening up Reactor to the public? |
Any news about |
Any news about Asynchronous Rx implementation in 2020? |
2022 perhaps? |
This pull request contains an initial implementation of "Async Rx" with the following essential interfaces:
IAsyncObservable<T>
, the dual toIAsyncEnumerable<T>
and the async variant ofIObservable<T>
IAsyncObserver<T>
, the dual toIAsyncEnumerator<T>
and the async variant ofIObserver<T>
IAsyncSubject<T>
, the async variant ofISubject<T>
IAsyncDisposable
, the async variant ofIDisposable
IAsyncScheduler
, the async variant ofIScheduler
Note that this PR is work in progress. While it has most operators implemented, there's some outstanding design work and a ton of testing to be done. The main goals of this initial PR are:
Interface variants would be possible with regards to supporting
CancellationToken
parameters, but it brings similar pains as the ones observed (pun intended) by the LDM for the C# 8.0 design of async streams. As such, this initial implementation uses a "cancellation agnostic" approach, though further study is warranted.In the context of Rx, the use of
CancellationToken
in various places clearly shows the pain these induce on top of the algebra of sequences, e.g. any cancellation of anOn*Async
call leaves observers in indeterminate states, so termination of the subscription is warranted, which indicates that theIAsyncDisposable
handle to the subscription and anyCancellationToken
s for event flow aren't orthogonal. Similar concerns occur when attempt to cancel the creation of a subscription.While more fine-grained control over cancellation can be useful for service abstractions of Rx (as done in the "Reactor" project in Bing) that cross I/O boundaries, such distributed abstractions could be regarded as being layered on top (i.e. we don't need a "one size fits all" interface necessarily). In fact, other orthogonal requirements are imposed in the distributed variants, such as the ability to pass in explicit identifiers for resources. More on that another time.