Jump to content
  • Advertisement

expert

Member
  • Content Count

    0
  • Joined

  • Last visited

Community Reputation

105 Neutral

About expert

  • Rank
    Newbie
  1. Also in sample 8a strand created but never used.
  2. Little note. In example Example 2e you can make it more concise using std:ref. Then example will look like [CODE] void WorkerThread( boost::asio::io_service & io_service ) { std::cout << "Thread Start\n"; io_service.run(); std::cout << "Thread Finish\n"; } int main(int argc, char **argv) { boost::asio::io_service io_service; boost::asio::io_service::work work(io_service); std::cout << "Press [return] to exit." << std::endl; boost::thread_group worker_threads; for( int x = 0; x < 4; ++x ) { worker_threads.create_thread( boost::bind( &WorkerThread, std::ref(io_service) ) ); } std::cin.get(); io_service.stop(); worker_threads.join_all(); return 0; } [/CODE]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!