From: "luke-gru (Luke Gruber) via ruby-core" Date: 2023-02-03T20:02:50+00:00 Subject: [ruby-core:112210] [Ruby master Bug#19410] If move from ractor fails with error, some objects are left in broken state Issue #19410 has been reported by luke-gru (Luke Gruber). ---------------------------------------- Bug #19410: If move from ractor fails with error, some objects are left in broken state https://bugs.ruby-lang.org/issues/19410 * Author: luke-gru (Luke Gruber) * Status: Open * Priority: Normal * Backport: 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- ```ruby 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. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/