{"blog_title":"hidemon\u306e\u30d6\u30ed\u30b0","image_url":null,"version":"1.0","published":"2008-12-17 01:42:57","title":"boost thread","height":"190","type":"rich","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/hidemon/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhidemon.hatenadiary.jp%2Fentry%2F20081217%2F1229532177\" title=\"boost thread - hidemon\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","author_name":"hidemon","provider_name":"Hatena Blog","description":"lambda\u306b\u5bc4\u308a\u9053\u3057\u305f\u304c\uff0cthread\u306e\u307b\u3046\uff0econdition variable\u3068mutex\u3092\u4f7f\u3063\u3066\u5171\u6709buffer\u3092\u4f5c\u3063\u3066\u307f\u308b\uff0e #include <iostream> #include <string> #include <boost/thread.hpp> #include <cstdlib> using namespace std; class buffer { list<int> queue; boost::condition_variable cond; boost::mutex mut; public: void push(int item) { { boost::lock_\u2026","url":"https://hidemon.hatenadiary.jp/entry/20081217/1229532177","categories":["C++"],"blog_url":"https://hidemon.hatenadiary.jp/","width":"100%"}