aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/transport/nirio/rpc/rpc_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/transport/nirio/rpc/rpc_client.cpp')
-rw-r--r--host/lib/transport/nirio/rpc/rpc_client.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/transport/nirio/rpc/rpc_client.cpp b/host/lib/transport/nirio/rpc/rpc_client.cpp
index 661f72e81..7b5970610 100644
--- a/host/lib/transport/nirio/rpc/rpc_client.cpp
+++ b/host/lib/transport/nirio/rpc/rpc_client.cpp
@@ -109,7 +109,7 @@ const boost::system::error_code& rpc_client::call(func_id_t func_id,
func_args_reader_t& out_args,
boost::posix_time::milliseconds timeout)
{
- boost::mutex::scoped_lock lock(_mutex);
+ std::unique_lock<std::mutex> lock(_mutex);
if (_io_service_thread.get()) {
_request.header.func_id = func_id;
@@ -168,7 +168,7 @@ const boost::system::error_code& rpc_client::call(func_id_t func_id,
void rpc_client::_handle_response_hdr(
const boost::system::error_code& err, size_t transferred, size_t expected)
{
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
_exec_err = err;
if (!_exec_err && (transferred == expected)) {
// Response header received. Verify that it is expected
@@ -205,7 +205,7 @@ void rpc_client::_handle_response_hdr(
void rpc_client::_handle_response_data(
const boost::system::error_code& err, size_t transferred, size_t expected)
{
- boost::mutex::scoped_lock lock(_mutex);
+ std::lock_guard<std::mutex> lock(_mutex);
_exec_err = err;
if (transferred != expected) {
_exec_err.assign(boost::asio::error::operation_aborted,