mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Use boost::thread instead of std::thread
std::thread crashes on (at least) ARMv6 g++ 4.8/4.9
This commit is contained in:
parent
1889c0e81c
commit
7c86c5997d
4 changed files with 7 additions and 5 deletions
|
@ -36,6 +36,7 @@
|
|||
#ifdef __OpenBSD__
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
namespace epee
|
||||
{
|
||||
|
@ -47,7 +48,7 @@ namespace epee
|
|||
, m_has_read_request(false)
|
||||
, m_read_status(state_init)
|
||||
{
|
||||
m_reader_thread = std::thread(std::bind(&async_stdin_reader::reader_thread_func, this));
|
||||
m_reader_thread = boost::thread(std::bind(&async_stdin_reader::reader_thread_func, this));
|
||||
}
|
||||
|
||||
~async_stdin_reader()
|
||||
|
@ -212,7 +213,7 @@ namespace epee
|
|||
};
|
||||
|
||||
private:
|
||||
std::thread m_reader_thread;
|
||||
boost::thread m_reader_thread;
|
||||
std::atomic<bool> m_run;
|
||||
|
||||
std::string m_line;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <boost/chrono.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
#include <chrono>
|
||||
#include "../../contrib/otshell_utils/utils.hpp"
|
||||
|
||||
|
@ -85,7 +86,7 @@ namespace net_utils
|
|||
|
||||
_info_c("dbg/data","Creating thread for data logger"); // create timer thread
|
||||
m_thread_maybe_running=true;
|
||||
std::shared_ptr<std::thread> logger_thread(new std::thread([&]() {
|
||||
std::shared_ptr<boost::thread> logger_thread(new boost::thread([&]() {
|
||||
_info_c("dbg/data","Inside thread for data logger");
|
||||
while (m_state == data_logger_state::state_during_init) { // wait for creation to be done (in other thread, in singleton) before actually running
|
||||
std::this_thread::sleep_for(std::chrono::seconds(1));
|
||||
|
|
|
@ -270,7 +270,7 @@ namespace nodetool
|
|||
bool m_offline;
|
||||
std::atomic<bool> m_save_graph;
|
||||
std::atomic<bool> is_closing;
|
||||
std::unique_ptr<std::thread> mPeersLoggerThread;
|
||||
std::unique_ptr<boost::thread> mPeersLoggerThread;
|
||||
//critical_section m_connections_lock;
|
||||
//connections_indexed_container m_connections;
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ namespace nodetool
|
|||
bool node_server<t_payload_net_handler>::run()
|
||||
{
|
||||
// creating thread to log number of connections
|
||||
mPeersLoggerThread.reset(new std::thread([&]()
|
||||
mPeersLoggerThread.reset(new boost::thread([&]()
|
||||
{
|
||||
_note("Thread monitor number of peers - start");
|
||||
while (!is_closing && !m_net_server.is_stop_signal_sent())
|
||||
|
|
Loading…
Reference in a new issue