2017-10-24から1日間の記事一覧

C++で簡単非同期プログラミング(std::thread,std::async) 

CPP

result.get()で処理を待って、値を返してくれる #include <future> ... auto result = std::async(std::launch::async, [] { return long_hogehoge(); }); // 非同期中の処理なにか std::cout << result.get() << std::endl;処理中かどうか判定をいれてその間アニメ</future>…