[ntp:hackers] Asynch resolver

Brian Utterback Brian.Utterback at Sun.COM
Tue May 9 02:01:08 UTC 2006


Danny Mayer wrote:
> Brian Utterback wrote:
>   
>> Danny Mayer wrote:
>>
>>     
>>>  Don't forget that ntpd is itself asynchronous, it doesn't
>>> wait for responses to it's packets, it just moves on to the next item.
>>> When it gets something back it processes it when it gets to it.
>>>
>>> Danny
>>>       
>> Sure, which is exactly why it currently has to do name resolution
>> in another process, since name resolution blocks and ntpd cannot
>> afford to block.
>>
>>     
>
> If you are just using getaddrinfo() and friends, then yes. But you don't
> have to do it that way. BIND does not even when it acts as the resolver.
>
>   
>> Again, arbitrary name resolution blocks. There is no way around that.
>> The only way to deal with that is to either do the name resolution in
>> another thread or another process. Doing it in another thread opens
>> yourself up to threading issues.
>>
>>     
>
> See above. There's more than one way to do this.
>
> Danny
>   
So, please explain what you are thinking. I don't get your idea here
at all.

Brian.


More information about the hackers mailing list