Project

General

Profile

Actions

Bug #19410

open

If move from ractor fails with error, some objects are left in broken state

Added by luke-gru (Luke Gruber) almost 2 years ago. Updated almost 2 years ago.

Status:
Assigned
Target version:
-
[ruby-core:112210]

Description

r = Ractor.new do
  obj = receive
end
a = Object.new
obj = [a, proc { }]
begin
  r.send(obj, move: true)
rescue => e
  puts "couldn't move"
end
p a # a is moved, this errors out. But it's not really moved because the other ractor can't access it. It's in limbo :)
r << :end
r.take

This might be tricky to fix, as it requires some sort of commit function for moving objects after every object is checked for ability to move.

Actions

Also available in: Atom PDF

Like0
Like0