Skip to content

Commit bba01ef

Browse files
committed
Switched std::lock_guard<std::mutex> for DiscreteGenerator to use tbb::spin_mutex::scoped_lock.
1 parent 7d6c707 commit bba01ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/open3d/utility/Random.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ class DiscreteGenerator {
210210

211211
/// Call this to generate a discretely distributed integer value.
212212
T operator()() {
213-
std::lock_guard<std::mutex> lock(*GetMutex());
214-
return distribution_(*GetEngine());
213+
tbb::spin_mutex::scoped_lock lock(GetMutex());
214+
return distribution_(GetEngine());
215215
}
216216

217217
protected:

0 commit comments

Comments
 (0)