Re: [Boost-bugs] [Boost C++ Libraries] #9124: Boost.Thread using of _beginthreadex prohibits its use on Windows Store application

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9124: Boost.Thread using of _beginthreadex prohibits its use on Windows Store application
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-20 06:17:53


#9124: Boost.Thread using of _beginthreadex prohibits its use on Windows Store
application
--------------------------------------+----------------------
  Reporter: beholder@… | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+----------------------

Comment (by viboes):

 Replying to [comment:7 ixSci <beholder@…>]:
> I belive there is no such a define out there. Windows 8.1 is not just
 Metro apps but plain old apps also. So it is up to the user to build boost
 specifically for Metro apps. So I propose to either add new define(e.g
 UNDER_WINRT) which allows to not define BOOST_HAS_THREADEX

 This can be done, see bellow. The major drawback is that you this forces
 you to have your own Boost installation. Are you sure there is no such a
 macro or set of macros (versions) that tell that _beginthreadex is not
 defined?

 or(better) replace existing BOOST_HAS_THREADEX with something like
 BOOST_IMPL_THREADEX. If BOOST_IMPL_THREADEX defined then use boost
 implemented _beginthreadex if not then use the native one. It allows to
 build boost.thread with custom _beginthreadex just by defining macros in
 bjam.
> Also it won't disturb current code much since only a few places must be
 touch to replace current logic about BOOST_HAS_THREADEX

 Are you suggesting that I change Boost.Thread current behavior on working
 platforms?
 Sorry, this could mean a lot of regressions.

 What I can do is add two configuration variables BOOST_THREAD_USE_THREADEX
 and BOOST_THREAD_DONT_USE_THREADEX in the following way:


 {{{
 #if defined BOOST_THREAD_USE_THREADEX && defined
 BOOST_THREAD_DONT_USE_THREADEX
 #error "BOOST_THREAD_USE_THREADEX and BOOST_THREAD_DONT_USE_THREADEX can
 not be defined simultaneously"
 #elif ! defined BOOST_THREAD_USE_THREADEX && ! defined
 BOOST_THREAD_DONT_USE_THREADEX
 #if defined BOOST_HAS_THREADEX
 #define defined BOOST_THREAD_USE_THREADEX
 #endif
 }}}


 and change the uses of BOOST_HAS_THREADEX in Boost.Thread by
 BOOST_THREAD_USE_THREADEX.

 Then in your case you would need to define BOOST_THREAD_DONT_USE_THREADEX
 to build Boost.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9124#comment:8>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC