Skip to content

Instantly share code, notes, and snippets.

@danielmoore
Created July 7, 2011 02:31
Show Gist options
  • Save danielmoore/1068800 to your computer and use it in GitHub Desktop.
Save danielmoore/1068800 to your computer and use it in GitHub Desktop.
Scheduler Testing
Console.ReadLine();
var sched = Scheduler.TaskPool;
var count = Observable
.Return(new Unit(), sched)
.Repeat()
// Use NewThread to avoid bias on the cutoff.
.TakeUntil(Observable.Timer(TimeSpan.FromSeconds(5), Scheduler.NewThread))
.Count()
.Single();
Console.WriteLine(count);
Console.ReadLine();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment