Answer the question
In order to leave comments, you need to log in
Is it possible to run io_service::run in parallel?
I have a rather large code in which the sanitizer detects the data race. In this code, I use mutexes in every method of my network interface class that stores/creates its socket for itself, something like this:
struct NetRequster {
//...
void some_work_if_recive();
void some_work_if_timeout();
// ...
private:
ba::ip::tcp::socket socket_;
std::mutex m;
// ...
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question