File tree Expand file tree Collapse file tree
addons/ofxOsc/libs/oscpack/src/ip/win32 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848#include < cstring> // for memset
4949#include < stdexcept>
5050#include < vector>
51+ #include < atomic>
5152
5253#include " ip/UdpSocket.h" // usually I'd include the module header first
5354 // but this is causing conflicts with BCB4 due to
@@ -353,7 +354,7 @@ class SocketReceiveMultiplexer::Implementation{
353354 std::vector< std::pair< PacketListener*, UdpSocket* > > socketListeners_;
354355 std::vector< AttachedTimerListener > timerListeners_;
355356
356- volatile bool break_;
357+ std::atomic< bool > break_ { false } ;
357358 HANDLE breakEvent_;
358359
359360 double GetCurrentTimeMs () const
@@ -418,8 +419,6 @@ class SocketReceiveMultiplexer::Implementation{
418419
419420 void Run ()
420421 {
421- break_ = false ;
422-
423422 // prepare the window events which we use to wake up on incoming data
424423 // we use this instead of select() primarily to support the AsyncBreak()
425424 // mechanism.
@@ -508,6 +507,7 @@ class SocketReceiveMultiplexer::Implementation{
508507 unsigned long enableNonblocking = 0 ;
509508 ioctlsocket ( i->second ->impl_ ->Socket (), FIONBIO, &enableNonblocking ); // make the socket blocking again
510509 }
510+ break_ = false ;
511511 }
512512
513513 void Break ()
You can’t perform that action at this time.
0 commit comments