Closed Daniel15 closed 6 years ago
For this basic use case, it's usually preferred to use Task.Run rather than Task.Factory.StartNew
Task.Run
Task.Factory.StartNew
Ref: https://blogs.msdn.microsoft.com/pfxteam/2011/10/24/task-run-vs-task-factory-startnew/ https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/task-based-asynchronous-programming
I swear I pulled this from some legit-looking MSDN API doc. But I guess I didn't search hard enough. Thank you!
It could have been an old doc, Task.Run was only added in .NET Framework 4.5 😄
For this basic use case, it's usually preferred to use
Task.Run
rather thanTask.Factory.StartNew
Ref: https://blogs.msdn.microsoft.com/pfxteam/2011/10/24/task-run-vs-task-factory-startnew/ https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/task-based-asynchronous-programming