Skip to content

Commit dffafe1

Browse files
authored
Fix AsyncObservable.DeferAsync infinite recursion (#1979)
The DeferAsync methods are meant to just call into the equivalent Defer methods. (I don't know why we have both, but I'm guessing that DeferAsync might be useful in cases where you want the compiler to infer the delegate type. With just Defer, it might be unclear whether you mean the one where the factory returns an observable, or the one where the factory returns a value task that produces an observable.)
1 parent 95d9ea9 commit dffafe1

File tree

1 file changed

+1
-1
lines changed
  • AsyncRx.NET/System.Reactive.Async/Linq/Operators

1 file changed

+1
-1
lines changed

AsyncRx.NET/System.Reactive.Async/Linq/Operators/Defer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public static IAsyncObservable<TSource> Defer<TSource>(Func<ValueTask<IAsyncObse
4343
});
4444
}
4545

46-
public static IAsyncObservable<TSource> DeferAsync<TSource>(Func<CancellationToken, ValueTask<IAsyncObservable<TSource>>> observableFactory) => DeferAsync(observableFactory);
46+
public static IAsyncObservable<TSource> DeferAsync<TSource>(Func<CancellationToken, ValueTask<IAsyncObservable<TSource>>> observableFactory) => Defer(observableFactory);
4747

4848
public static IAsyncObservable<TSource> Defer<TSource>(Func<CancellationToken, ValueTask<IAsyncObservable<TSource>>> observableFactory)
4949
{

0 commit comments

Comments
 (0)