Eregon (Benoit Daloze) wrote in #note-1: > A frozen buffer might still be moved (by the GC) though, which needs to be prevented during native calls (e.g. `write(2)`). > ... Thanks. As far as I understand, INTERNAL and MAPPED memory, an...himura467 (Akito Shitara)
I've opened https://bugs.ruby-lang.org/issues/22506 to agree on what read-only, lock and freeze mean for `IO::Buffer`, following the discussion on `freeze` here. It would be great to continue that discussion there.himura467 (Akito Shitara)
Following https://bugs.ruby-lang.org/issues/22274#note-16, I'd like to agree on what each of these means for `IO::Buffer`, so that the remaining fixes follow one model. This is a proposal, and I'd appreciate corrections. | | What it p...himura467 (Akito Shitara)
```ruby S = Set[].freeze Ractor.new { S }.join ``` ``` -e:1: [BUG] rb_objspace_reachable_objects_from_local: set is owned by another Ractor ``` Class variables and instance variables of classes crash the same way. Ruby 4.0.7 d...himura467 (Akito Shitara)
ioquatix (Samuel Williams) wrote in #note-10: > As per my design, a buffer that is frozen does not need to update or touch `locked_count` (in fact, only a buffer with `locked_count == 0` can be frozen). Once frozen, all operations (that...himura467 (Akito Shitara)
ioquatix (Samuel Williams) wrote in #note-6: > `freeze` is for "safe to share this Ruby object" and `readonly` means the backing buffer cannot be modified by this view. As far as I know, there is currently no API to make an existing ...himura467 (Akito Shitara)
ioquatix (Samuel Williams) wrote in #note-6: > Therefore, I'm against a frozen buffer meaning underlying memory cannot be modified. If Matz agrees, I don't have a strong opinion on how freeze should be interpreted. However, under thi...himura467 (Akito Shitara)