CGAL 5.6 - Manual
Loading...
Searching...
No Matches
Multithreading
Author
Andreas Fabri

Thread Local Storage

The header file <CGAL/tss.h> provides a macro CGAL_STATIC_THREAD_LOCAL_VARIABLE(TYPE,VAR,ARG1) that creates a thread local variable VAR of type TYPE, and passes ARG1 to the constructor. The variable is either thread_local, or just a local variable if CGAL_HAS_THREADS is not defined.

Mutex

The header file <CGAL/mutex.h> provides a macro CGAL_MUTEX equivalent to std::mutex and a macro CGAL_SCOPED_LOCK(M) that is a std::unique_lock<std::mutex>.