[getdns-api] PHP Language Bindings and Async Event Management

Melinda Shore melinda.shore at nomountain.net
Fri Apr 17 21:04:41 CEST 2015


On 4/17/15 10:27 AM, Hollenbeck, Scott wrote:
> So, what's the best way to approach the event management operations
> needed for asynchronous processing?

I won't claim it's "best" (I'd like to see non-blocking callback
processing, as well) but what I did in the Python bindings was
to bind the event base to the context, and when the user issues
a query I create a new event base only if there isn't one already.
This allows <bignum> queries to be issued asynchronously against
a given context.  There's also a Context.run() method, which runs the
event loop (and is blocking), and it's called at the user's pleasure.
The run() method is the only place where the event loop is run.

Melinda

-- 
Melinda Shore
No Mountain Software
melinda.shore at nomountain.net

"Software longa, hardware brevis."
_______________________________________________
getdns-api mailing list
getdns-api at vpnc.org



More information about the spec mailing list