Let's say I have a simple program like
public static main(string[] args)
{
Task<int> hotTask = Task<int>.Run(() => SomethingThatRunsInBackgroundAndReturnsAnInt());
DoIndependentWork();
hotTask.Wait();
Console.WriteLine(hotTask.Result);
}
Would this technically be "synchronous" despite the fact that it runs a background thread that doesn't need to be finished before the next unit of work (DoIndependentWork()
) is started and finished? I can't find a very good technical definition anywhere on the internet.