mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 02:14:51 +00:00
Replace boost::thread by std::thread
This commit is contained in:
parent
14899a3a77
commit
4fe976ba01
@ -38,12 +38,11 @@ target_link_libraries(front_end_cal_lib
|
|||||||
core_receiver
|
core_receiver
|
||||||
core_libs
|
core_libs
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
Boost::boost
|
||||||
Gflags::gflags
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
Gnuradio::blocks
|
Gnuradio::blocks
|
||||||
Gnuradio::runtime
|
Gnuradio::runtime
|
||||||
Boost::serialization
|
|
||||||
Boost::thread
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ENABLE_CLANG_TIDY)
|
if(ENABLE_CLANG_TIDY)
|
||||||
@ -65,8 +64,9 @@ target_link_libraries(front-end-cal
|
|||||||
front_end_cal_lib
|
front_end_cal_lib
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
Boost::filesystem
|
||||||
|
Gflags::gflags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
Armadillo::armadillo
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_compile_definitions(front-end-cal
|
target_compile_definitions(front-end-cal
|
||||||
|
@ -38,10 +38,7 @@
|
|||||||
#include "gps_iono.h"
|
#include "gps_iono.h"
|
||||||
#include "gps_navigation_message.h"
|
#include "gps_navigation_message.h"
|
||||||
#include "gps_utc_model.h"
|
#include "gps_utc_model.h"
|
||||||
#include <boost/filesystem.hpp>
|
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
|
||||||
#include <boost/thread/thread.hpp>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
#include <boost/exception/detail/exception_ptr.hpp>
|
#include <boost/exception/detail/exception_ptr.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
#include <boost/thread.hpp>
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <gnuradio/blocks/file_sink.h>
|
#include <gnuradio/blocks/file_sink.h>
|
||||||
#include <gnuradio/blocks/file_source.h>
|
#include <gnuradio/blocks/file_source.h>
|
||||||
@ -73,6 +72,7 @@
|
|||||||
#include <exception>
|
#include <exception>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <queue>
|
#include <queue>
|
||||||
|
#include <thread>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
@ -398,7 +398,7 @@ int main(int argc, char** argv)
|
|||||||
std::map<int, double> doppler_measurements_map;
|
std::map<int, double> doppler_measurements_map;
|
||||||
std::map<int, double> cn0_measurements_map;
|
std::map<int, double> cn0_measurements_map;
|
||||||
|
|
||||||
boost::thread ch_thread;
|
std::thread ch_thread;
|
||||||
|
|
||||||
// record startup time
|
// record startup time
|
||||||
std::chrono::time_point<std::chrono::system_clock> start, end;
|
std::chrono::time_point<std::chrono::system_clock> start, end;
|
||||||
@ -417,9 +417,9 @@ int main(int argc, char** argv)
|
|||||||
stop = false;
|
stop = false;
|
||||||
try
|
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)";
|
LOG(INFO) << "Exception caught (thread resource error)";
|
||||||
}
|
}
|
||||||
@ -457,7 +457,7 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
ch_thread.join();
|
ch_thread.join();
|
||||||
}
|
}
|
||||||
catch (const boost::thread_resource_error& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
LOG(INFO) << "Exception caught while joining threads.";
|
LOG(INFO) << "Exception caught while joining threads.";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user