mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 22:02:08 +02:00
Fix generic mutex usage, see https://svn.boost.org/trac/boost/ticket/9461.
This commit is contained in:
@ -125,12 +125,15 @@ private:
|
||||
// Since this preprocessor path is almost never taken, we hide these header
|
||||
// dependencies so that build tools don't find them.
|
||||
//
|
||||
#define B1 <boost/thread/once.hpp>
|
||||
#define B2 <boost/thread/recursive_mutex.hpp>
|
||||
#include B1
|
||||
#include B2
|
||||
#undef B1
|
||||
#undef B2
|
||||
#define BOOST_REGEX_H1 <boost/thread/once.hpp>
|
||||
#define BOOST_REGEX_H2 <boost/thread/recursive_mutex.hpp>
|
||||
#define BOOST_REGEX_H3 <boost/thread/lock_types.hpp>
|
||||
#include BOOST_REGEX_H1
|
||||
#include BOOST_REGEX_H2
|
||||
#include BOOST_REGEX_H3
|
||||
#undef BOOST_REGEX_H1
|
||||
#undef BOOST_REGEX_H2
|
||||
#undef BOOST_REGEX_H3
|
||||
|
||||
namespace boost{
|
||||
|
||||
@ -158,7 +161,7 @@ public:
|
||||
void lock();
|
||||
void unlock();
|
||||
private:
|
||||
boost::recursive_mutex::scoped_lock* m_plock;
|
||||
boost::unique_lock<boost::recursive_mutex>* m_plock;
|
||||
bool m_have_lock;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user