Anonymous functions and Thread.Tasks