Skip to content

Stop Ractors after parent-side failures - #386

Closed
OskarEichler wants to merge 1 commit into
grosser:masterfrom
OskarEichler:codex/cleanup-ractors-on-parent-errors
Closed

Stop Ractors after parent-side failures#386
OskarEichler wants to merge 1 commit into
grosser:masterfrom
OskarEichler:codex/cleanup-ractors-on-parent-errors

Conversation

@OskarEichler

Copy link
Copy Markdown
Contributor

Summary

Stop every remaining worker Ractor when producer, start callback, finish callback, or parent-side result handling raises. Ruby 3 yielded results are drained during cleanup.

External producer/start/finish failure models pass on Ruby 4.0.6 and 3.2.11. Diff and syntax checks pass. Source only; repository tests are unchanged.

Comment thread lib/parallel.rb

def ractor_stop(ractor)
ractor.send([[nil, nil], nil, :break])
rescue Ractor::ClosedError

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

this makes sense

@grosser grosser left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

looks about right

@grosser

grosser commented Aug 30, 2026

Copy link
Copy Markdown
Owner

let me manually merge this ...

@grosser grosser closed this Aug 30, 2026
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