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

Delay stream creation until the next loop tick #416

Merged
merged 3 commits into from Aug 23, 2023

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Aug 22, 2023

Motivation:

A recent change allowed stream creation to run immediately if the caller was on the correct event loop. Normally that's fine, however, it opens up a code path where streams can become activated twice which leads to a crash.

Modifications:

  • Delay stream creation until the next loop tick
  • Add a loop tick to tests which now require it

Result:

Avoid re-entrantly activating streams twice.

Motivation:

A recent change allowed stream creation to run immediately if the caller
was on the correct event loop. Normally that's fine, however, it opens
up a code path where streams can become activated twice which leads to a
crash.

Modifications:

- Delay stream creation until the next loop tick
- Add a loop tick to tests which now require it

Result:

Avoid re-entrantly activating streams twice.
@glbrntt glbrntt added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Aug 22, 2023
@glbrntt glbrntt merged commit 92afa4f into apple:main Aug 23, 2023
8 checks passed
@glbrntt glbrntt deleted the gb-delay-create-stream branch August 23, 2023 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants