[#86520] [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError) — samuel@...
Issue #14681 has been reported by ioquatix (Samuel Williams).
3 messages
2018/04/12
[#86755] [Ruby trunk Feature#14723] [WIP] sleepy GC — normalperson@...
Issue #14723 has been reported by normalperson (Eric Wong).
6 messages
2018/04/29
[ruby-core:86644] Re: [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError)
From:
Eric Wong <normalperson@...>
Date:
2018-04-21 18:02:20 UTC
List:
ruby-core #86644
samuel@oriontransfer.org wrote: > Excuse my ignorance, but if you call write, why can't you just > directly invoke `::write`? Why do you need to do > `rb_thread_io_blocking_region`? rb_thread_io_blocking_region releases the GVL because write(2) may block on slow filesystem, full pipe/sockets, etc. We no longer set O_NONBLOCK on sockets/pipes by default since 1.9+; and but that didn't help with slow filesystems whose buffers are full (or using weird stuff like O_SYNC/O_DIRECT). rb_thread_io_blocking_region is slightly different than rb_thread_call_without_gvl because Ruby has traditionally signaled cross-thread IO#close with IOError instead of undefined platform-specific behavior (sometimes EBADF, sometimes blocks for a long time and succeeds, ...). I'm not sure I actually agree with this behavior, just stating what things are. Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>