39 #ifndef REALTIME_TOOLS__REALTIME_BUFFER_H_ 40 #define REALTIME_TOOLS__REALTIME_BUFFER_H_ 108 std::unique_lock<std::mutex> guard(
mutex_, std::try_to_lock);
109 if (guard.owns_lock())
125 std::lock_guard<std::mutex> guard(
mutex_);
136 std::lock_guard<std::mutex> guard(
mutex_);
138 std::unique_lock<std::mutex> guard(
mutex_, std::try_to_lock);
139 while (!guard.owns_lock()) {
140 std::this_thread::sleep_for(std::chrono::microseconds(500));