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

Make waitForRequestBlock run every event loop #480

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Conversation

HDegroote
Copy link
Contributor

The try cancel block from a different session test was occasionally hanging (maybe 1/1000 runs).

I couldn't trace exactly why (even just adding log statements threw off the timing sufficiently to make it always pass) but a possible cause is that the loop in waitForRequestBlock skipped over the request, which in the previous code is possible if it's extremely short-lived (~1ms). By using setImmediate that should no longer be possible

Note: also got rid of the unused opts argument

@mafintosh mafintosh merged commit 7733e7a into main Feb 23, 2024
4 checks passed
@mafintosh mafintosh deleted the cleanup-cancel-tests branch February 23, 2024 08:24
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.

2 participants