[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: threads and resolving names

Roger Pack

8/9/2007 2:04:00 AM

Subject: [ruby-talk:10482] Re: threads and resolving names
From: "Joseph McDonald" <joe vpop.net>
Date: Wed, 7 Feb 2001 15:27:00 +0900
In-reply-to: 10481

> |I thought if I created a bunch of threads that I could get around
> |the problem and would only hang when all threads (100) are hung.
> |But that doesn't seem to be the case. Do I have my threading
> |wrong?
>
> Sorry, resolving by gethostbyname(3) etc block whole process. It's a
> pity of user level thread.
>
> matz.

I for one find this a serious defect [all threads block (?) when one is
resolving a DNS address]. Well cross your fingers and hope it gets
fixed soon!

Thanks.
-Roger
--
Posted via http://www.ruby-....

1 Answer

Eric Hodel

8/9/2007 2:17:00 AM

0

On Aug 8, 2007, at 19:03, Roger Pack wrote:
> Subject: [ruby-talk:10482] Re: threads and resolving names
> From: "Joseph McDonald" <joe vpop.net>
> Date: Wed, 7 Feb 2001 15:27:00 +0900
> In-reply-to: 10481
>
>> |I thought if I created a bunch of threads that I could get around
>> |the problem and would only hang when all threads (100) are hung.
>> |But that doesn't seem to be the case. Do I have my threading
>> |wrong?
>>
>> Sorry, resolving by gethostbyname(3) etc block whole process. It's a
>> pity of user level thread.
>>
>> matz.
>
> I for one find this a serious defect [all threads block (?) when
> one is
> resolving a DNS address]. Well cross your fingers and hope it gets
> fixed soon!

It was fixed ages ago.

require 'resolv'

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars