Re: [Boost-bugs] [Boost C++ Libraries] #3104: Preprocessing with Boost::wave crashes when calling from multiple threads

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3104: Preprocessing with Boost::wave crashes when calling from multiple threads
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-05-30 15:35:46


#3104: Preprocessing with Boost::wave crashes when calling from multiple threads
---------------------------------+------------------------------------------
  Reporter: www.brutaltruth.ru | Owner: hkaiser
      Type: Bugs | Status: closed
 Milestone: Boost 1.40.0 | Component: wave
   Version: Boost 1.39.0 | Severity: Problem
Resolution: fixed | Keywords: wave spirit multithreading
---------------------------------+------------------------------------------

Comment(by anonymous):

 The problem with your code is that you are including the Spirit headers
 files independently and before including Wave. Wave enables Spirit thread
 safety whenever it is compiled in multi-threaded mode. But if you include
 Spirit before Wave you need to switch Spirit (and probably Phoenix) into
 multi-threaded mode yourself. I was able to run your example successfully
 by adding:
 {{{
 #define BOOST_SPIRIT_THREADSAFE 1
 #define PHOENIX_THREADSAFE 1 // needed only if you use Phoenix
 }}}

 to your stdafx.h before including Spirit.

 HTH
 Regards Hartmut

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3104#comment:3>
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:00 UTC