From: Eric Wong <normalperson@...> Date: 2017-01-05T00:52:58+00:00 Subject: [ruby-core:78973] Re: [Ruby trunk Bug#13085] io.c io_fwrite creates garbage normalperson@yhbt.net wrote: > Issue #13085 has been updated by Eric Wong. > > File 0001-io.c-io_fwrite-temporarily-freeze-string-when-writin.patch added > Caveat, there is one potential race condition: > > If another thread calls String#freeze on the string we are > currently writing; we will blindly unfreeze it during > fwrite_unfreeze from ensure. However, I do not expect this to > be a real-world case. > > Ideally, Ruby should have a way of detecting threads which > are not visible to other threads. Any comment? I still have not been able to think of a better solution. I'll commit in a month or five if no objections. > https://bugs.ruby-lang.org/issues/13085#change-62335 Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>