mirror of https://github.com/CGAL/cgal
Add a wrapper for the very basic mutex locking we make use of
This commit is contained in:
parent
a6c646346d
commit
52e5f3a521
|
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef CGAL_MUTEX_H
|
||||||
|
#define CGAL_MUTEX_H
|
||||||
|
|
||||||
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#include <mutex>
|
||||||
|
#define CGAL_MUTEX std::mutex
|
||||||
|
#define CGAL_SCOPED_LOCK(M) std::unique_lock<std::mutex> scoped_lock(M)
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include <boost/thread/mutex.hpp>
|
||||||
|
#define CGAL_MUTEX boost::mutex
|
||||||
|
#define CGAL_SCOPED_LOCK(M) boost::mutex::scoped_lock scoped_lock(M)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // CGAL_MUTEX_H
|
||||||
Loading…
Reference in New Issue