#include <MRTbbThreadMutex.h>
Classes | |
class | LockGuard |
RAII-style lock guard for the mutex; releases it on destruction. More... | |
Public Member Functions | |
MRMESH_API | TbbThreadMutex (std::thread::id id=std::this_thread::get_id()) |
MRMESH_API std::optional< LockGuard > | tryLock () |
helper class used to ensure that the specific thread is not re-used by TBB use it if you have nested TBB operations (e.g. parallel_for inside another parallel_for)
|
explicit |
construct class
id | - id of thread allowed to lock the mutex |
MRMESH_API std::optional< LockGuard > MR::TbbThreadMutex::tryLock | ( | ) |
try to lock the mutex returns a lock guard if the current thread id is equal to the mutex's one and the mutex is not locked yet