{"height":"190","categories":["CPP"],"description":"result.get()\u3067\u51e6\u7406\u3092\u5f85\u3063\u3066\u3001\u5024\u3092\u8fd4\u3057\u3066\u304f\u308c\u308b #include <future> ... auto result = std::async(std::launch::async, [] { return long_hogehoge(); }); // \u975e\u540c\u671f\u4e2d\u306e\u51e6\u7406\u306a\u306b\u304b std::cout << result.get() << std::endl;\u51e6\u7406\u4e2d\u304b\u3069\u3046\u304b\u5224\u5b9a\u3092\u3044\u308c\u3066\u305d\u306e\u9593\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u3055\u305b\u308b\u3068\u304b\u3055\u305b\u308b\u306a\u3089 auto status = result->wait_for(std::chrono::milliseconds(0)); bool isGet = status ==\u2026","published":"2017-10-24 10:10:05","author_name":"shikaku","blog_title":"shikaku's blog","version":"1.0","provider_url":"https://hatena.blog","url":"https://blog.systemjp.net/entry/2017/10/24/101005","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.systemjp.net%2Fentry%2F2017%2F10%2F24%2F101005\" title=\"C++\u3067\u7c21\u5358\u975e\u540c\u671f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0(std::thread,std::async)\u3000 - shikaku&#39;s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","author_url":"https://blog.hatena.ne.jp/shikaku/","image_url":null,"blog_url":"https://blog.systemjp.net/","provider_name":"Hatena Blog","width":"100%","title":"C++\u3067\u7c21\u5358\u975e\u540c\u671f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0(std::thread,std::async)\u3000"}