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:48:16


#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 ixSci <beholder@…>):

 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?
 Yes it is ugly and not very convenient but there is no other choice we can
 achieve it without introducing another library(.lib file) which would
 contain custom _beginthreadex implementation and would be linked if native
 one is absent. I've done it that way for now in my application: I just
 provided stub implementation of _beginthreadex for my app and it works.

 Why there is no other choice? Because you can create Metro app as well as
 any other app for Windows 8.1. And existence of _beginthreadex depends on
 Visual Studio project type(more accurately on compiler switch). So one may
 want to create Metro app and for that he needs boost with custom
 _beginthreadex. But one may also have some desktop app he's working on so
 for that app he would better use boost with native _beginthreadex.

 Actually Boost.Thread is almost useless for Metro Apps since they have
 strict rules of what can be used with it and current Boost.Thread doesn't
 conform(at least boost::thread). So there is no point to use boost::thread
 with WinRT(Metro). Yet many other boost libs depends on Boost.Thread and
 it gives a pain.

     Are you suggesting that I change Boost.Thread current behavior on
 working platforms? Sorry, this could mean a lot of regressions.
 Yes, I meant exactly it. I don't think it will introduce any regression
 since it may be integrated quite smoothly since the only change which is
 needed is to change macro name and change '''ifndef''' to '''ifdef'''.
 Moreover WinCE not a popular platform these days, if it still alive. But
 I'm sure you know what is better since you're a maintainer.

 Your proposition also seems to be a solution for the issue.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9124#comment:9>
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