in reply to Re: Using Threading to speed up DNS Resolution
in thread Using Threading to speed up DNS Resolution

Actually most gethostby*_r() implementations can be used with threading with no significant issues. Perhaps you are thinking of the non reentrant gethostby*()?

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on Re^2: Using Threading to speed up DNS Resolution

Replies are listed 'Best First'.
Re^3: Using Threading to speed up DNS Resolution
by Elian (Parson) on Oct 22, 2004 at 18:31 UTC
    No, you misunderstand. It's not that the interface isn't threadsafe. It's that the implementation is single-threaded. That is, no matter how many threads are making name lookup requests, there'll only be one actually in-flight at any one time. Having 50 threads making simultaneous name lookups will get you 1 thread doing a name lookup and 49 threads waiting their turn to issue the name lookup.