O

Size: a a a
O
ПК
VK
Е
AB
AB
Е
AB
AB
Е
ПК
std::thread([]()
{
std::this_thread::sleep_for(std::chrono::seconds{ 5 });
auto s = std::make_unique<std::string>("Hello from thread " + (std::stringstream{} << std::this_thread::get_id()).str());
QMetaObject::invokeMethod(qApp, [s = std::move(s)]()
{
qDebug() << s->c_str();
qApp->quit();
});
}).detach();
ПК
Е
std::thread([]()
{
std::this_thread::sleep_for(std::chrono::seconds{ 5 });
auto s = std::make_unique<std::string>("Hello from thread " + (std::stringstream{} << std::this_thread::get_id()).str());
QMetaObject::invokeMethod(qApp, [s = std::move(s)]()
{
qDebug() << s->c_str();
qApp->quit();
});
}).detach();
QMetaObject::invokeMethod
медленныйПК
QMetaObject::invokeMethod
медленныйЕ
ПК
Е
ПК
ПК
Е