Skip to content

Fix Barrier when parent.async() yields early#449

Merged
ioquatix merged 2 commits intosocketry:mainfrom
tavianator:fix-barrier-wait-yield
Mar 17, 2026
Merged

Fix Barrier when parent.async() yields early#449
ioquatix merged 2 commits intosocketry:mainfrom
tavianator:fix-barrier-wait-yield

Conversation

@tavianator
Copy link
Contributor

If parent.async() returns before running @tasks.append(node), then
barrier.async() itself will return before @tasks is updated, causing
barrier.wait to not actually wait on the new task.

Types of Changes

  • Bug fix.

Contribution

If `parent.async()` returns before running `@tasks.append(node)`, then
`barrier.async()` itself will return before `@tasks` is updated, causing
`barrier.wait` to not actually wait on the new task.
@ioquatix ioquatix force-pushed the fix-barrier-wait-yield branch 3 times, most recently from 38e302e to 6c001e6 Compare March 17, 2026 19:48
@ioquatix ioquatix force-pushed the fix-barrier-wait-yield branch from 6c001e6 to 29d7532 Compare March 17, 2026 19:48
Copy link
Member

@ioquatix ioquatix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, nice find.

@ioquatix ioquatix merged commit 1d91f85 into socketry:main Mar 17, 2026
36 of 39 checks passed
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