Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# create tasks and wait all

List<Task> TaskList = new List<Task>();
foreach(...)
{
   var LastTask = new Task(SomeFunction);
   LastTask.Start();
   TaskList.Add(LastTask);
}

Task.WaitAll(TaskList.ToArray());
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #tasks #wait
ADD COMMENT
Topic
Name
7+6 =