Skip to content

Only start the stream monitoring after events are send out #1765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025

Conversation

laeubi
Copy link
Contributor

@laeubi laeubi commented Mar 10, 2025

Currently it is almost impossible to capture the full binary stream of a process even if one adds a listener right after creation of the stream proxy. The reason is that the streams are immediately started to being read in the constructor. The code currently uses some caching in place but this only works reliable for a single listener and is then reset afterwards having other missing data depending on how fast they can register. Even worse there is a small chance that after registration and before reading the buffer some bytes are received and then is processed before the buffer contents.

This now creates a new constructor that only creates the stream but do not start them. Instead users must call the method startMonitoring for this. The RuntimeProcess now uses this constructor to delay the start of stream reading unless all notifications are performed so other parties can register accordingly.

See

Currently it is almost impossible to capture the full binary stream of a
process even if one adds a listener right after creation of the stream
proxy. The reason is that the streams are immediately started to being
read in the constructor. The code currently uses some caching in place
but this only works reliable for a single listener and is then reset
afterwards having other missing data depending on how fast they can
register. Even worse there is a small chance that after registration and
before reading the buffer some bytes are received and then is processed
before the buffer contents.

This now creates a new constructor that only creates the stream but do
not start them. Instead users must call the method startMonitoring for
this. The RuntimeProcess now uses this constructor to delay the start of
stream reading unless all notifications are performed so other parties
can register accordingly.
Copy link
Contributor

Test Results

1 214 files  ±0  1 214 suites  ±0   1h 0m 30s ⏱️ + 1m 12s
4 173 tests ±0  4 127 ✅ ±0   46 💤 ±0  0 ❌ ±0 
9 541 runs  ±0  9 420 ✅ ±0  121 💤 ±0  0 ❌ ±0 

Results for commit ee99fbe. ± Comparison against base commit e8c3e2d.

@laeubi laeubi merged commit 392ec31 into eclipse-platform:master Mar 10, 2025
16 of 17 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.

1 participant