❔ Quickest way to get an async function to run?

I have an async function with an await inside and I'm currently using Task.Run to start it, but there is a small delay in starting. Is there a way to make it run straight away?
5 Replies
Angius
Angius3y ago
Just... await it..?
Limited Past
Limited PastOP3y ago
i cant await it because its being called from a non-async function
Angius
Angius3y ago
Then make that method async as well It's async all the way down
Limited Past
Limited PastOP3y ago
Thanks guys, I'll just await it and make the calling functions async
Accord
Accord3y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?