WinRT の同時実行モデルを使い始めたばかりです。待機する必要があるタスクがありますが、wait() を呼び出すと、キャッチできない例外がスローされます。
最も単純なコード:
concurrency::task<StorageFile^> getFileTask = concurrency::create_task(Windows::Storage::ApplicationData::Current->LocalFolder->GetFileAsync(fileString));
getFileTask.wait();
スローされる例外は次のとおりです。
Microsoft C++ exception: Concurrency::invalid_operation at memory location 0x0402C45C
これが機能するように設定するにはどうすればよいですか?