Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Impact when - awaiting the async method which does not have any await calls

$
0
0
I have a following async method which does not have any await calls.

    public async Task<bool> AddCust(Customer cust)
        {
// doing some synchronous operations
return true;           
        }

Following method calls the above method and await for the result.

    public async Task<bool> ParentMethod(Customer cust)
    {
var result = await AddCust(cust);
     if(!result)
           // some logic
     return true;
    }


Here the caller awaits on the AddCust method (which does not have any await calls)
Now, question is if I keep the above code as it is would it be any negative impact on performance? 

Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>