1
Answer

how to handle if asyn process returns before await?

Photo of rajesh yadav

rajesh yadav

2w
152
1
If GetStringAsync (and therefore getStringTask) completes before GetUrlContentLengthAsync awaits it, control remains in GetUrlContentLengthAsync. The expense of suspending and then returning to GetUrlContentLengthAsync would be wasted if the called asynchronous process getStringTask has already completed and GetUrlContentLengthAsync doesn't have to wait for the final result.

Answers (1)