Donny Andrian
Donny Andrian

Reputation: 55

WinRT/C++ std::thread vs winrt::resume_background()

After studying std::thread, I know that a function can be run on a different thread than the main thread, which is similar to the concept of winrt::resume_background() which will continue executing code on another thread (ThreadPool).

So the questions are,

  1. Can std::thread replace winrt::resume_background()?
  2. Can std::thread be used for a function that will update the UI on a desktop application with WinRT/C++ libraries directly without having to manually revert it on the UI thread?

Because if all these things are possible, then of course this can be a solution to all the co_awaiting problems and wrong threads.

Upvotes: 2

Views: 533

Answers (0)

Related Questions