Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

run async method parallel c#

public Task<Thing[]> GetThingsAsync()
{
    var first = GetExpensiveThingAsync();
    var second = GetExpensiveThingAsync();

    return Task.WhenAll(first, second);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #run #async #method #parallel
ADD COMMENT
Topic
Name
8+8 =