ofxLibwebsockets icon indicating copy to clipboard operation
ofxLibwebsockets copied to clipboard

Race condition

Open chuckleplant opened this issue 9 years ago • 0 comments

Great lib!

Found this:

The deque elements in Connection are accessed both by the Server thread and the one that enqueues via Server::send. This is a race condition as std::deque is not thread safe.

Hotfix: Use a mutex in Server both in the Connection::update and the Connection::send calls.

Betterfix: Use this lock free FIFO structure

chuckleplant avatar Jan 19 '17 15:01 chuckleplant