[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: stream closed (IOError

Yukihiro Matsumoto

10/6/2008 1:22:00 AM

Hi,

In message "Re: stream closed (IOError)"
on Mon, 6 Oct 2008 04:44:37 +0900, "Eric Will" <rakaur@malkier.net> writes:

|On Sun, Oct 5, 2008 at 1:15 PM, Yukihiro Matsumoto <matz@ruby-lang.org> wrote:
|> Show me the URL if you need further info, since I can read some
|> Japanese. ;-)
|
|I'm not sure if these are relevant, since Google now shows lots of
|this thread. :)
|
|http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/rub...

It's about the already fixed bugs.

|http://133.44.98.95/cgi-bin/vframe.rb/ruby/ruby-list/31677?3...

It's related to dRuby.

|http://www.rubyist.net/~nobu/t/200...

Exceptions "closed steam" and "stream closed" are different. A good
hint, I believe.

|http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-...

It's related to dRuby.

According to the third URL, "stream closed" error was raised when fd
(IO object) is closed while a thread is waiting for that fd,
i.e. you've closed a socket which other thread (timer callback) is
blocking on.

matz.

1 Answer

Eric Will

10/6/2008 10:47:00 AM

0

On Oct 5, 2008, at 9:21 PM, Yukihiro Matsumoto wrote:
> According to the third URL, "stream closed" error was raised when fd
> (IO object) is closed while a thread is waiting for that fd,
> i.e. you've closed a socket which other thread (timer callback) is
> blocking on.

I think it was happening because the timer would kill off the socket,
and then select() would be trying to check it in the main thread (no
clue what was up with the error reporting, thread confusion!). I
worked around this by just moving the timeout check from a Timer to
manually doing it in the ioloop, before the dead connections are
removed. Now it never gets to select(), and it works just fine. Thanks
for your personal attention in helping me figure this out, matz. :)

> matz.

-- Eric Will