Skip to content

Instantly share code, notes, and snippets.

@anaisbetts
Created June 21, 2012 02:32
Show Gist options
  • Select an option

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

Select an option

Save anaisbetts/2963489 to your computer and use it in GitHub Desktop.
IObservable<SomeResult> CalculateSomeStuff(SomeStuff anItem)
{
}
// Do work on 4 threads at a time
someListOfStuff.ToObservable()
.Select(x => Observable.Defer(() => CalculateSomeStuff(x)))
.Merge(4)
.ToList()
.Subscribe(x => {
Console.WriteLine("Sweet I've got a new List");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment