How to use ContinueWith in an Async Function to Make Sure Thread Executes One after the Other


Question: How do use ContinueWith in an Async Function to Make Sure Thread Executes One after the Other


Login to See the Rest of the Answer

Answer:  When working in Asp.Net Core and would like to an Async Call to execute immedietly the other Async Call completes, then use ContinueWith
See the code below:

//Async Call 1
var myResults = await myService.CallService().ContinueWith(a => {

myOtherService.CallService();
});
.NET 5
published
v.0.02



Jack said:

Look into ways to not use Async, sometimes Async Await can be the curse.

Posted On: March 24, 2023 20:30:07 PM


For peering opportunity Autonomouse System Number: AS401345 Custom Software Development at ErnesTech Email Address[email protected]