Skip to content
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

Fix deadlock in TestPrematureCancel. #742

Closed
wants to merge 1 commit into from

Conversation

QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Jan 15, 2021

The c.allocated channel is only written in NewContext, and subsequently closed when the browser is allocated. But the browser is allocated in Run and this test calls Cancel before Run, so the channel couldn't possible receive any more data nor be closed for a second read to not block.

Fixes #675.

The `c.allocated` channel is only written in `NewContext`, and
subsequently closed when the browser is allocated. But the browser is
allocated in `Run` and this test calls `Cancel` before `Run`, so the
channel couldn't possible receive any more data nor be closed for a
second read to not block.
@kenshaw
Copy link
Member

kenshaw commented Jan 16, 2021

Greatly appreciated! Added to master.

@kenshaw kenshaw closed this Jan 16, 2021
@QuLogic QuLogic deleted the fix-cancel-deadlock branch January 16, 2021 23:31
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.

Tests Occasionally Hang on Fresh Clone of Repo
2 participants