public MyClass foo(int parameter)
{
var foo = new Task<MyClass>(() => bar(parameter));
try
{
return foo.Result;
}
}
What happens in terms of threads when I create a new Task.
That means that new thread(B) started to evaluate bar(parameter) and when the main thread(A) goes to foo.Result; they wait until B finish and return Result?