But the main thread should not be blocked right?

----- Original Message ----- 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Thursday, June 05, 2008 5:56 AM
Subject: Re: [twsocket] Host lookup blocks the main thread


Éric Fleming Bonilha wrote:
> Hello,
>
> I´m having a strange problem with ICS
> On our architecture we use TWSocket client components on separated
> threads because of lengthy operations so our main thread will not be
> blocked, but we are having such a strange problem, when our software
> tries to connect to an invalid host name (like the string "test" or
> "abcabcabc") it will block the main thread for some seconds until the
> component receives the reponse of invalid host, is this behaviour
> normal to block the main thread?

No, method DnsLookUp() works asynchrone, so even multiple concurrent
lookups in the same thread won't block.
But internally winsock serializes DNS lookups, that even happens when
the lookups are executed in multiple threads.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to