Boost.Asioã®io_serviceã«ã¯ãpost()ã¨dispatch()ã¨ããã»ã¼åããã¨ãããé¢æ°ãç¨æããã¦ãã¾ãã 以ä¸ã®ããã°ã§ãããããã解説ããã¦ããã®ã§ããããè¦ã¦ãããã¨ã«ãã¾ãã To post or to dispatch? - This Thread ã¾ããio_serviceãè¤æ°ã¹ã¬ããã§åä½ããã¾ãã ããã¨ãæåã«ã¡ã¤ã³ã¹ã¬ããã®IDãåºåãã¦ããã¾ãã std::cout << boost::this_thread::get_id() << std::endl; asio::io_service io_service; asio::io_service::work work(io_service); boost::thread_group group; const int count = 3; for (int i = 0; i < count;
{{#tags}}- {{label}}
{{/tags}}