1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-18 19:19:56 +00:00

Replace boost::thread by std::thread

This commit is contained in:
Carles Fernandez 2019-02-25 00:02:53 +01:00
parent 14899a3a77
commit 4fe976ba01
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
3 changed files with 8 additions and 11 deletions

View File

@ -38,12 +38,11 @@ target_link_libraries(front_end_cal_lib
core_receiver
core_libs
PRIVATE
Boost::boost
Gflags::gflags
Glog::glog
Gnuradio::blocks
Gnuradio::runtime
Boost::serialization
Boost::thread
)
if(ENABLE_CLANG_TIDY)
@ -65,8 +64,9 @@ target_link_libraries(front-end-cal
front_end_cal_lib
gnss_sdr_flags
PRIVATE
Boost::filesystem
Gflags::gflags
Glog::glog
Armadillo::armadillo
)
target_compile_definitions(front-end-cal

View File

@ -38,10 +38,7 @@
#include "gps_iono.h"
#include "gps_navigation_message.h"
#include "gps_utc_model.h"
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <glog/logging.h>
#include <cmath>
#include <exception>

View File

@ -57,7 +57,6 @@
#include <boost/exception/detail/exception_ptr.hpp>
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/thread.hpp>
#include <glog/logging.h>
#include <gnuradio/blocks/file_sink.h>
#include <gnuradio/blocks/file_source.h>
@ -73,6 +72,7 @@
#include <exception>
#include <memory>
#include <queue>
#include <thread>
#include <utility>
#include <vector>
@ -398,7 +398,7 @@ int main(int argc, char** argv)
std::map<int, double> doppler_measurements_map;
std::map<int, double> cn0_measurements_map;
boost::thread ch_thread;
std::thread ch_thread;
// record startup time
std::chrono::time_point<std::chrono::system_clock> start, end;
@ -417,9 +417,9 @@ int main(int argc, char** argv)
stop = false;
try
{
ch_thread = boost::thread(wait_message);
ch_thread = std::thread(wait_message);
}
catch (const boost::thread_resource_error& e)
catch (const std::exception& e)
{
LOG(INFO) << "Exception caught (thread resource error)";
}
@ -457,7 +457,7 @@ int main(int argc, char** argv)
{
ch_thread.join();
}
catch (const boost::thread_resource_error& e)
catch (const std::exception& e)
{
LOG(INFO) << "Exception caught while joining threads.";
}