Skip to content

Thread race fix - #11

Merged
viacheslauK merged 3 commits into
mainfrom
thread-race-fix
Jul 6, 2026
Merged

Thread race fix#11
viacheslauK merged 3 commits into
mainfrom
thread-race-fix

Conversation

@viacheslauK

@viacheslauK viacheslauK commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Brief:

  • Guards for the client side (WsStreamingDevice);
  • Using Device::removedNoLock() to stop boost::asio executor thread (otherwise Device::removed() will create deadlock);
  • Move data publishing from acquisition thread to boost::asio executor so wss::detail::peer processing will be handled only on one thread (wss::detail::peer is not thread-save);

marshal local_signal set_metadata/publish_data onto the server strand so peer I/O never races client disconnect

@NikolaiShipilov NikolaiShipilov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Comment thread shared/libraries/websocket_streaming/src/ws_streaming_listener.cpp Outdated
@viacheslauK
viacheslauK merged commit bd41338 into main Jul 6, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants