title: Is there an interface wrapper around the Task Parallel Library so that I can swap it out for unit testing?
body: <p>I asked <a href="https://stackoverflow.com/questions/3362734/unit-testing-concurrent-software-what-do-you-do">this question</a> a while ago.  I now know it is a Bad Idea and that encapsulating the scheduling and running of tasks should be abstracted so that one can pass in a synchronous  scheduler from the unit tests.</p>
  
  <p>I've currently got code that uses the <a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx" rel="nofollow noreferrer">Task Parallel Library</a> (TPL) and I'd like to inject something like <code>ITaskScheduler</code> into my types to extract out responsibility of scheduling and enable me to pass in a synchronous alternative in my tests.</p>
  
  <p>Does such a thing exist?  I'm looking for something that wraps <code>Task.Factory.StartNew</code> and <code>Task.ContinueWith</code>.  I don't suppose it's not too much work to roll my own, but I'm sure there's lots of little <em>gotchas</em> and I don't really want to spend time doing it if there's one already available.</p>