Closed pwretmo closed 1 year ago
Thanks for this.
This looks like a pretty straightforward mistake. The DeferAsync
method is meant to call the equivalent Defer
, but calls itself instead.
(As for how on earth something this obvious got missed, this is an experimental project and never had any tests. Our goal is to work out how to take the existing test suite for normal Rx and apply it to AsyncRx.NET. #1900 This would have been picked up immediately if it had ever been tested.)
I've created a PR to fix this. We'll do a new preview release at some point, but in the meantime if you're blocked, you can just invoke Defer
instead. That DeferAsync
overload is meant to be an alias for a particular overload of Defer
. (I don't know the history, but my guess is that in some situations, calling DeferAsync
narrows down the number of possibilities the compiler type inference has to consider, which might help avoid explicit type arguments in some scenarios.)
Hello and thank you for using dotnet/reactive. Please select a category and detail your issue by answering the questions there:
Bug
Despite our best efforts, bugs can slip into releases or corner cases forgotten about. We will try our best to remedy the situation and/or provide workarounds. Note that certain (odd) behaviors are by design and as such are not considered bugs.
System.Reactive.Async 6.0.0-alpha.18
Windows 10 x64, .NET 7.0
The DeferAsync overload taking an CancellationToken calls itself recursively.
An IAsyncObservable is returned.
Stackoverflow exception