I'm trying to create a task in VS2019 UWP C++. I've got this bit of code:
IAsyncAction ^frame;
auto frame_task = create_task(frame);
frame_task.then([this]()
{
// Noop
});
What I want to do is have an infinite loop that does frame processing periodically where the Noop is. This code compiles but throws and exception claiming this is NULL. Perhaps I'm not providing a return value for the lambda? Any suggestions welcome. Thanks