From: Sean Gilbertson Date: 2003-05-03T06:20:21+09:00 Subject: Re: Ruby (1.6.7) Net::FTP/OS call hang I am now happily using Resolv.rb with successful results. Thank you very much! I tested out some file downloads to make sure that those would not freeze anything, and they didnt seem to at all. Do you know of any other problem areas that I should look out for? Thanks again, Sean On Friday, May 2, 2003, at 03:54 PM, Dave Thomas wrote: > Sean Gilbertson wrote: > >> I think Ruby is a great language, and I would love to use it, but >> for one problem. I am creating an FTP program to hone my Ruby >> skills, using RubyCocoa as a platform. Everything is working well so >> far, except when I connect to an FTP server, all the threads hang. I >> remember reading in the book that this is something to be expected in >> Ruby, as OS calls like this hang all threads when they dont return >> immediately. Obviously this is going to be a huge problem, as all >> the benefits of multithreading are moot, when most of my threads will >> be doing FTP transactions. My question is: Have and subsequent >> versions of Ruby remedied this problem? I understand it is a symptom >> of how Ruby works, but knowing that does not help me. I have looked >> for changelogs and such, with no luck so far. > > You're probably hanging doing the DNS lookup. Perhaps using the thread > aware resolv.rb library might help. > > Cheers > > > Dave > >