[dotnet] [bidi] Revert... Wait until events are dispatched#17178
[dotnet] [bidi] Revert... Wait until events are dispatched#17178nvborisenko merged 1 commit intoSeleniumHQ:trunkfrom
Conversation
…ribing (SeleniumHQ#17142)" This reverts commit 2f71272.
Review Summary by QodoRevert BiDi event dispatch synchronization to fix deadlocks
WalkthroughsDescription• Reverts event dispatching synchronization that caused logical deadlocks • Simplifies event registration and unsubscription flow • Removes drain mechanism that waited for pending events • Refactors event processing to use record struct instead of class File Changes1. dotnet/src/webdriver/BiDi/EventDispatcher.cs
|
Code Review by Qodo
1. Handler added after subscribe
|
There was a problem hiding this comment.
Pull request overview
Reverts the prior change that waited for pending BiDi events to be dispatched during unsubscription, due to the risk of user event handlers blocking event processing and causing hangs.
Changes:
- Replaces per-registration “drain” tracking with a simpler pending-event channel carrying method/type info.
- Updates subscription/unsubscription bookkeeping to directly add/remove handlers without draining.
- Adjusts the background event processing loop and its error handling/logging.
This reverts commit 2f71272.
Blocking events processing by users' handlers appeared risky. It might logically blocks.
🔗 Related Issues
#16574
🔄 Types of changes