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

419 Views Asked by At

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.

0

There are 0 best solutions below