Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/pthread/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ namespace boost
unsigned thread::physical_concurrency() BOOST_NOEXCEPT
{
#ifdef __linux__
try {
BOOST_TRY {
using namespace std;

ifstream proc_cpuinfo ("/proc/cpuinfo");
Expand Down Expand Up @@ -570,9 +570,10 @@ namespace boost
// Fall back to hardware_concurrency() in case
// /proc/cpuinfo is formatted differently than we expect.
return cores.size() != 0 ? cores.size() : hardware_concurrency();
} catch(...) {
} BOOST_CATCH(...) {
return hardware_concurrency();
}
BOOST_CATCH_END
#elif defined(__APPLE__)
int count;
size_t size=sizeof(count);
Expand Down