[getdns-users] getdns_context_run() vs. getdns_context_process_async()

Hollenbeck, Scott shollenbeck at verisign.com
Thu Apr 30 19:21:54 UTC 2015


> -----Original Message-----
> From: Users [mailto:users-bounces at getdnsapi.net] On Behalf Of Willem
> Toorop
> Sent: Thursday, April 30, 2015 8:31 AM
> To: users at getdnsapi.net
> Subject: Re: [getdns-users] getdns_context_run() vs.
> getdns_context_process_async()
> 
> Hi Scott,
> 
> getdns_context_run() blocks and runs the event loop until there is
> nothing more to process.
> 
> getdns_context_process_async() does not block, but has a quick look to
> see if queries have been received, and if so does the callbacks.  Then
> it looks if events have a timed out, and if so does those callbacks
> too.
> 
> Note that getdns_context_process_async() does not work with stub
> requests with libevent.  Although I can see some potential use cases
> for
> getdns_context_process_async(), I would rather get rid of it.

Thanks, Willem. Should I expect to see a different callback_type value in my callback function if I call one versus the other?  I'm asking because while running through my PHP test cases I found that calling getdns_context_run() gave me a callback_type of 700 (GETDNS_CALLBACK_COMPLETE). Calling getdns_context_process_async() gave me a callback_type of 701 (GETDNS_CALLBACK_CANCEL). Is this expected behavior?

Thanks,
Scott




More information about the Users mailing list