CodePlexProject Hosting for Open Source Software
An unexpected error has occured.
There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Voted
rwaldron wrote Oct 2, 2012 at 7:13 PM
danielearwicker wrote Oct 3, 2012 at 10:31 AM
danielearwicker wrote Oct 3, 2012 at 8:09 PM
oisin wrote Dec 6, 2012 at 2:37 PM
oisin wrote Dec 6, 2012 at 2:38 PM
bolinfest wrote Dec 31, 2012 at 12:04 AM
jods wrote Jan 22 at 9:26 AM
justinc wrote Feb 18 at 9:07 PM
danielearwicker wrote Feb 19 at 3:39 PM
the difference is that coroutines have multiple returns while await still has only a single return.
I do not believe that yield is a valid substitute for async/await.
When you use yield, the function in which yield is called may be suspended, but control flow is synchronously returned to the calling function.
var result = await SlowCalculation(a, b);
var result = yield return SlowCalculation(a, b);
int result; yield return SlowCalculation(a, b, v => result = v);
jods wrote Feb 20 at 8:40 AM
jonturner wrote Mar 7 at 10:54 PM
Sign in to add a comment or to set email notifications
Keyboard shortcuts are available for this page.