Is it possible to force a task to execute synchronously, on the current thread?
That is, is it possible, by e.g. passing some parameter to StartNew(), to ma
StartNew()
You can simply return the result of func() wrapped in a Task.
func()
Task
public class NoThreading : IThreads { public Task StartNew(Func func) { return Task.FromResult(func()); } }
Now you can attach "continue with" tasks to this.