Skip to content

Instantly share code, notes, and snippets.

@anaisbetts
Created December 2, 2011 23:22
Show Gist options
  • Select an option

  • Save anaisbetts/1425313 to your computer and use it in GitHub Desktop.

Select an option

Save anaisbetts/1425313 to your computer and use it in GitHub Desktop.
public IObservable<Result> IssueTheQuery() { /* Blah */ }
Observable.Defer(() => IssueTheQuery())
.Timeout(TimeSpan.FromSeconds(5))
.Retry(3)
.Subscribe(
x => Console.WriteLine("Result was {0}!", x),
ex => Console.WriteLine(ex));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment