Opened 8 years ago

Closed 8 years ago

#10996 closed Bugs (fixed)

Thread physical_concurrency() is failing on Windows

Reported by: Niall Douglas Owned by: Niall Douglas
Milestone: Boost 1.58.0 Component: thread
Version: Boost 1.57.0 Severity: Regression
Keywords: Cc:

Description

As previously discussed. Assigning to myself.

Change History (6)

comment:1 by Niall Douglas, 8 years ago

Owner: changed from Anthony Williams to Niall Douglas

comment:2 by viboes, 8 years ago

Would it be enough to return

return hardware_concurrency();

instead of returning 0 in

    unsigned thread::physical_concurrency() BOOST_NOEXCEPT
    {
// a bit too strict: Windows XP with SP3 would be sufficient
#if BOOST_PLAT_WINDOWS_RUNTIME                                    \
    || ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \
    || ( defined(__MINGW32__) && !defined(__MINGW64__) )
        return 0;
#else

comment:3 by Niall Douglas, 8 years ago

I'm a bit confused why we disable use of GetLogicalProcessorInformation() at all actually as out lowest supported platform is Windows XP SP3.

I've removed the check here so it only disables on WinRT from now on. And for WinRT it now returns hardware_concurrency(). If it passes on Mingw I'll push the fix.

comment:4 by Niall Douglas, 8 years ago

Fix pushed.

comment:6 by viboes, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.