Repository navigation
Conversation
Each stream's recording thread prints its status with chained `<<` on std::cout. The threads leave enter_streaming_phase() together, so their "Started data collection" lines are printed at the same instant and can interleave mid-line, e.g.: Started data collection for stream Started data collection for stream AB.. Wrappers that parse stdout line by line (pylabrecorder) then miss a stream and time out although the recording is running. Route the per-stream messages through a mutex-guarded helper that writes each line in one piece.
|
@cboulay We caught that one on our system using |
mscheltienne
added a commit
to fedemengo/pylabrecorder
that referenced
this pull request
Nov 9, 2026
- Reset the recorder when no stream matches, so it can be started again. - Replace the stdout-interleaving test, which asserted the upstream fix (labstreaminglayer/App-LabRecorder#151), with a test that starting a recording of 8 streams succeeds whether or not lines are torn. - Release the test outlets in a finally block so a failure does not leak streams into tests recording every stream on the network. - Skip the fake-CLI tests on Windows, where a shell script can't be executed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each stream's recording thread prints its status with chained
<<onstd::cout. The threads leaveenter_streaming_phase()together, so theirStarted data collectionlines are printed at the same instant and can interleave mid-line, e.g.:Tools that parse
LabRecorderCLI's stdout line by line (e.g. pylabrecorder) then miss a stream and time out, although the recording is running fine.This routes the per-stream messages through a small mutex-guarded helper that writes each line in one piece.
Reproduction: record 8 streams at once with
LabRecorderCLI. Without this change the output above shows up on the first attempt; with it, every line holds exactly one message.