Skip to content

test(threading): pin the pitfalls of the client threading model - #3386

Closed
Yury Semikhatsky (yury-s) wants to merge 1 commit into
mainfrom
test-threading-model
Closed

Yury Semikhatsky (yury-s) wants to merge 1 commit into
mainfrom
test-threading-model

Conversation

@yury-s

Copy link
Copy Markdown
Member

Summary

  • One test for the guarantee the model gives: events that precede a reply in the protocol are fully handled before the awaited method returns.
  • Five tests for its pitfalls, asserted as they are today: event-driven waits (Waiter) resume inline on the reader thread, so Page.Load has not fired yet after await WaitForLoadStateAsync(), and a synchronous wait there stalls the connection; the same for event handlers; a throwing handler closes the whole connection.
  • Discussion material for the threading section added in docs(claude): describe the threading model and client architecture #3385; when the model changes, these tests change with it.

Passes on chromium, firefox and webkit, three runs each.

Six short tests that assert what the threading model does today: the
ordering guarantee for events that precede a reply, and the pitfalls
that follow from event-driven waits and event handlers running on the
reader thread.
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