Relation between ub_fd/ub_poll/ub_process and ub_ctx_async
wouter at nlnetlabs.nl
Mon Feb 27 09:02:03 CET 2017
On 24/02/17 18:51, Rick van Rein via Unbound-users wrote:
> I'm not quite clear on the relation between ub_ctx_async() on the one
> hand, and ub_fd(), ub_poll() and ub_process() the other hand. The
> latter triple can clearly be integrated with an event loop, but the
> former seems to suggest that background threads or processes are used.
These calls all make a thread or process that does the work. And then
the result is piped back to you.
> If I use ub_resolve_async() but don't call ub_ctx_async() at all, will
> there be no background thread or process and can I instead do my own
> integration with an event loop? Otherwise, how does integration with an
> event loop work?
Look into unbound-event.h, where ub_resolve_event() is there so you can
integrate the resolution process in to your event loop.
Best regards, Wouter
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: OpenPGP digital signature
More information about the Unbound-users