-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[dotnet] Experimentally resolve the STD starvation issue #16350
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
/// Gets a value indicating whether the service is responding to HTTP requests. | ||
/// </summary> | ||
protected virtual bool IsInitialized | ||
protected virtual async Task<bool> IsInitialized() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had that PR to make this async that got delayed to v5 over concerns of breaking changes: #15246
If we are OK updating it now, I’d like to get that PR in and expand this solution on top of that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this doesn't resolve the issue. What I see: as soon as we dedicate new thread just to listen to console output, seems it works fine.
User description
This is my experiments to resolve the #16245 (comment) issue.
💥 What does this PR do?
It allocates dedicated thread to listen to console process output immediately.
PR Type
Bug fix
Description
Replace async event-based output reading with dedicated threads
Convert synchronous service initialization to async pattern
Add comprehensive logging for service lifecycle debugging
Fix potential STD stream starvation issue in driver services
Diagram Walkthrough
File Walkthrough
DriverService.cs
Core service threading and async refactor
dotnet/src/webdriver/DriverService.cs
FirefoxDriverService.cs
Firefox service method signature update
dotnet/src/webdriver/Firefox/FirefoxDriverService.cs
changes
DriverServiceCommandExecutor.cs
Async service start integration
dotnet/src/webdriver/Remote/DriverServiceCommandExecutor.cs
ICommandServer.cs
Interface async method signature update
dotnet/src/webdriver/Remote/ICommandServer.cs