Re: [Boost-bugs] [Boost C++ Libraries] #9848: flyweight: hidden dependency on pthread

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9848: flyweight: hidden dependency on pthread
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-07 16:38:42


#9848: flyweight: hidden dependency on pthread
-------------------------------+-----------------------
  Reporter: akim@… | Owner: joaquin
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: flyweight
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+-----------------------

Comment (by joaquin):

 Hi,

 The dependency stems from the usage of
 `boost::flyweights::simple_locking`:

 http://www.boost.org/libs/flyweight/doc/reference/locking.html#simple_locking

 which takes advantage of the synchronization mechanisms available on the
 target environment. Your !ArchLinux GCC distribution is configured in such
 a way that `BOOST_HAS_PTHREADS` is defined hence the need to link Pthreads
 with -lpthread. If you don't want to do the linking because your app is
 single-thread, you can either

 * use `boost::flyweights::no_locking` as the locking policy or
 * globally set the `BOOST_DISABLE_THREADS` macro.

 Please report back whether this clarifies the issue for you. Best,

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9848#comment:1>
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:15 UTC