[ruby-core:86648] Re: [Ruby trunk Bug#14681] `syswrite': stream closed in another thread (IOError)

From: Eric Wong <normalperson@...>
Date: 2018-04-22 00:10:25 UTC
List: ruby-core #86648
samuel@oriontransfer.org wrote:
> > 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).

> Can I set this to avoid the breaking code path? I know the
> write would succeed every time in this case.

In that case, it sounds like you can use write_nonblock instead
of syswrite.  *_nonblock functions do not release GVL.

> > signaled cross-thread IO#close
> 
> Do you mind explaining what this is? Do you mean if one thread
> is calling `read` and then another thread calls `close` while
> `read` is still in progress?

Exactly

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next