What is the difference between spamming functions by themseves vs via tasks/threads. Im using dotnet as example, where we have the tasks api for simplified multithreading.
suppose:
SomeController(){
foo1();
foo2();
if(someStatus == myStatus){
foo3()}
}
//vs
Dict<task, status> tasks
{foo1(), "execute",
foo2(), "execute",
foo3(), "myStatus",}
//will run the foos using threads
forEach(t => t.Factory.StartNew(t))
Is this only so you can benefit from multithreading? Is this only necessary on something from scratch (csharp, java) and if only using a we framework (spring, dotnet, flask) it will do thesame under the hood?