Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #220 from apathyboy/develop
Browse files Browse the repository at this point in the history
Account for the already existing main thread of execution when spinning ...
  • Loading branch information
Kronos11 committed Mar 14, 2012
2 parents a033697 + cf78d5c commit 4ea9622
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/swganh/app/swganh_app.cc
Expand Up @@ -156,7 +156,9 @@ void SwganhApp::Start() {
boost::asio::io_service::work io_work(kernel_->GetIoService());

// Start up a threadpool for running io_service based tasks/active objects
for (uint32_t i = 0; i < boost::thread::hardware_concurrency(); ++i) {
// The increment starts at 1 because the main thread of execution already counts
// as thread in use.
for (uint32_t i = 1; i < boost::thread::hardware_concurrency(); ++i) {
auto t = make_shared<boost::thread>([this] () {
kernel_->GetIoService().run();
});
Expand Down

0 comments on commit 4ea9622

Please sign in to comment.