I am working on a script to submit an order to multiple accounts simultaneously in a loop. i.e.
foreach (Account myAccount in MyAccoutList)
{
submitTheAccount(myAccount);
}
Will it be more efficient to start a new thread for each submitTheAccount call like this?
foreach (Account myAccount in MyAccoutList)
{
Thread thread =new Thread(() =>submitTheAccount(myAccount));
thread.Start();
}
Which way is recommended?

Comment