Observable.Interval produces value every period of time. How to make it wait until action ends before the next iteration?
Example:
Observable.Interval(TimeSpan.FromSeconds(1)).Subscribe(async t =>
{
//Here could be some long running action with different duration each iteration
Console.WriteLine(t.ToString());
await Task.Delay(3000);
});
It will start action every second. How to make it wait until action is completed?