Bug:UdpCmdDemux: Add SpinLock for races around stop()
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <memory>
|
||||
#include <boost/asio/posix/stream_descriptor.hpp>
|
||||
#include <componentThread.h>
|
||||
#include <spinLock.h>
|
||||
|
||||
namespace livoxProto1 {
|
||||
|
||||
@@ -81,6 +82,7 @@ private:
|
||||
uint16_t dataPort;
|
||||
|
||||
// State management
|
||||
smo::SpinLock isActiveAndShouldStopLock;
|
||||
std::atomic<bool> isActive{false};
|
||||
std::atomic<bool> shouldStop{false};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user