On WP7, I get this output:
Notice that, on WP7, the entire DoAThingAsync() function executes before control returns to Update(), but on Windows, the expected behavior (control returning to Update() before the async work finishes.
It seems that using Stream.BeginRead() (which didn't used to be available on WP7, I'm assuming it was made available with the Async CTP) works, and the callback comes from the main thread, so perhaps it's using an async task under the hood?
If using BeginRead()/EndRead() solves my problem, then great. But I'd still like to know why await doesn't seem to do the right thing on WP7.
2012년 3월 31일 토요일 오후 5:18
Microsoft는 Msdn 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 Msdn 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.