, BOTH
myclass.initiateState();
val = myclass.getValues();
( val)?
, .NET 4.0 Tasks, :
var someBackgroundTask = new System.Threading.Tasks.Task<*return type of GetValue()*>(() =>
{
myclass.initiateState();
return myclass.getValue();
});
someBackgroundTask.Start();
someBackgroundTask.Result, . , - ( ), Task. someBackgroundTask.IsCompleted, , , someBackgroundTask.Wait(), .
: , , , .;)