© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
9 replies
CrosRoad95

❔ Making an async method without anything to async inside

let's say i have following scenario:
void Foo()
{
  for(int i = 0 ; i < 10000000 ;i++){} // simulate load
}
void Foo()
{
  for(int i = 0 ; i < 10000000 ;i++){} // simulate load
}

the following method is blocking, but also don't have anything that can await inside.
how can i turn this example into
async Task Foo()
async Task Foo()
?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Using an async method to print contents of an array
C#CC# / help
3y ago
An async function called without await
C#CC# / help
2y ago
❔ Calling async method
C#CC# / help
4y ago
Call to async method waiting for execution even without await
C#CC# / help
4y ago