From: "hsbt (Hiroshi SHIBATA) via ruby-core" Date: 2023-02-07T06:04:19+00:00 Subject: [ruby-core:112250] [Ruby master Bug#19410] If move from ractor fails with error, some objects are left in broken state Issue #19410 has been updated by hsbt (Hiroshi SHIBATA). Status changed from Open to Assigned Assignee set to ko1 (Koichi Sasada) ---------------------------------------- Bug #19410: If move from ractor fails with error, some objects are left in broken state https://bugs.ruby-lang.org/issues/19410#change-101678 * Author: luke-gru (Luke Gruber) * Status: Assigned * Priority: Normal * Assignee: ko1 (Koichi Sasada) * 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/