-
Notifications
You must be signed in to change notification settings - Fork 770
Closed
Description
i tried to implement RetryUntil in my code with:
public static Task<T> RetryUntil<T,TOther>(this object any, IObservable<T> obs, IObservable<TOther> end)
{
using ( var cts = new CancellationTokenSource())
using (end.Subscribe(v => cts.Cancel(true)))
{
return obs
.Retry()
.TakeUntil(end)
.ToTask(cts.Token);
}
}
but that gives me an invalidOperationException: "Sequence Contains no Elements". if end publishes a value.
Is there any way i can get a TaskCancellation Exception.
Also RetryWhen is missing from Rx.net and id like to retry after some amount of time rather than instant. How can i do that without RetryWhen?
Is there any reason the above methods are not included? / may i submit a pr?
gtbuchanan