Not sure I follow. Are you asking a question? I'll try to guess.
With an asynchronous function, you have 2 choices: Await it, or not await it.
If you await it, the executing thread will immediately mark as "do for later" all of the code below the await and will go look for work to do to its task queue.
If you don't await it, the asynchronous task is started, but the executing thread that started it does not wait for it to finish, and continues processing the code. This is the case I explained. Cooking is started but not awaited. The thread continued to grate the cheese while the kitchen cooktop cooked the potatoes.
Either choice is valid as long as it gets you the desired result, ideally in the fastest possible time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you very much, that's mean , I only call the async function (it will be async) and assign it to variable
var cookTask = CookPotatoes();
Not sure I follow. Are you asking a question? I'll try to guess.
With an asynchronous function, you have 2 choices: Await it, or not await it.
If you await it, the executing thread will immediately mark as "do for later" all of the code below the
awaitand will go look for work to do to its task queue.If you don't await it, the asynchronous task is started, but the executing thread that started it does not wait for it to finish, and continues processing the code. This is the case I explained. Cooking is started but not awaited. The thread continued to grate the cheese while the kitchen cooktop cooked the potatoes.
Either choice is valid as long as it gets you the desired result, ideally in the fastest possible time.