<div class="gmail_quote">On Fri, Nov 27, 2009 at 9:20 PM, r0g <span dir="ltr"><<a href="http://aioe.org">aioe.org</a>@<a href="http://technicalbloke.com">technicalbloke.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div>Ahh so close. I set the alarm for 3 seconds and it raises the exception,<br></div>
but only after spending 25 seconds seemingly blocked in gethostbyname.<br>
<br>
Here's a snippet, just in case I'm doing it wrong!...<br><br></blockquote><div><br>If you're doing many lookups prior to connecting to the machines or otherwise processing the information, you can create a very simple thread class to perform just the lookup, store the threads in a list, and poll the threads in the list so you can deal with the ones that finish first before moving on to the remaining ones.  You'll still have a 25 second wait for the last ones to finish, but you can get the majority of the work done earlier than you would with a single-thread program.<br>
 </div></div>-- <br>Computers are like air conditioners...<br>They quit working when you open Windows.<br>