build: prefer std::thread over boost::thread

This commit is contained in:
Danny Robson 2016-10-08 17:22:21 +11:00
parent 598c5d4e48
commit c711d7e0f5
3 changed files with 5 additions and 10 deletions

View File

@ -3,7 +3,7 @@
ACLOCAL_AMFLAGS = -I m4
AM_CXXFLAGS = $(BOOST_CPPFLAGS)
AM_CXXFLAGS =
AM_DEFAULT_SOURCE_EXT = .cpp
###############################################################################
@ -368,7 +368,7 @@ EXTRA_DIST += ${top_srcdir}/build-aux/wine-crlf.sh
###############################################################################
## Utility programs
LDADD = $(top_builddir)/libcruft-util.a $(BOOST_LDFLAGS) $(LIBS)
LDADD = $(top_builddir)/libcruft-util.a $(LIBS)
bin_PROGRAMS = \
tools/json-clean \

View File

@ -101,10 +101,6 @@ NC_DEBUGGING
CHECK_RAGEL([ip.cpp])
NC_BOOST([1.53], [system thread])
AC_SUBST(BOOST_CPPFLAGS)
AC_SUBST(BOOST_LDFLAGS)
###############################################################################
## Optional packages

View File

@ -19,8 +19,7 @@
#include "raii.hpp"
#include <stdexcept>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include <mutex>
using util::stringid;
@ -32,8 +31,8 @@ stringid::add (const std::string key) {
if (pos != m_map.end ())
throw std::invalid_argument ("duplicate stringid key");
static boost::mutex s_lock;
boost::lock_guard<boost::mutex> raii (s_lock);
static std::mutex s_lock;
std::lock_guard<std::mutex> guard (s_lock);
id_t id = m_map.size ();
m_map[key] = id;