© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
8 replies
Len

Async function

Hello guys,
what is the best way to stop a async function?
I made a async function, which monitors if a key is pressed. Should I use the cancel Token? And is Task<> with Return the only why to get something back from the function?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Multithreading an async function
C#CC# / help
3y ago
✅ Async PushButton Functions
C#CC# / help
3y ago
An async function called without await
C#CC# / help
2y ago
❔ Async function seems to continue running after returning.
C#CC# / help
4y ago