Reputation: 55
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,
std::thread
replace winrt::resume_background()
?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_await
ing problems and wrong threads.
Upvotes: 2
Views: 533