Skip to content
Snippets Groups Projects
Commit 67979890 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Fix lock guard

parent 77d55a27
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,7 @@ namespace armarx::detail::RobotUnitDataStreamingReceiver
void update(const RobotUnitDataStreaming::TimeStepSeq& data, const Ice::Current&) override
{
std::lock_guard{_data_mutex};
std::lock_guard g{_data_mutex};
ARMARX_INFO << deactivateSpam()
<< "received " << data.size() << " timesteps";
_data.emplace_back(data);
......@@ -98,7 +98,7 @@ namespace armarx
ARMARX_CHECK_NOT_NULL(_receiver);
std::deque<RobotUnitDataStreaming::TimeStepSeq> data;
{
std::lock_guard{_receiver->_data_mutex};
std::lock_guard g{_receiver->_data_mutex};
std::swap(data, _receiver->_data);
}
for (auto& chunk : data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment