Created
July 7, 2011 02:31
-
-
Save danielmoore/1068800 to your computer and use it in GitHub Desktop.
Scheduler Testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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