Repository navigation
docs(claude): describe the threading model and client architecture - #3385
Closed
Yury Semikhatsky (yury-s) wants to merge 2 commits into
Closed
Yury Semikhatsky (yury-s) wants to merge 2 commits into
Yury Semikhatsky (yury-s) wants to merge 2 commits into
Conversation
Document that Core/ mirrors the JS client method for method, how messages are dispatched on the transport reader thread while user continuations run on the thread pool, and what that means for changes: subscribe before checking, no locks, event subscriptions that talk to the server, NoInlining on public API methods. Also where regression tests go, how the test adapters are structured and how they are tested.
Incoming messages are handled one at a time, so an event that precedes a reply is fully handled before the awaiting code resumes, while events after the reply race with it. Waits that complete through an event resume inline on the reader thread.
Collaborator
|
Closing in favor of #3453. |
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.
Summary
Core/mirrorspackages/playwright-core/src/client/method for method; which files are generated and by what.Waiter) resume inline on the reader thread. Consequences for changes: subscribe before checking, nolock, don't block after an event-driven wait, event subscriptions that sendupdateSubscription,NoInliningon public API methods.Written up from the review of #3384 and verified with probe tests on chromium.