void ext_dns_ctx_wait ( extDnsCtx ctx)

Blocks the caller until the provided ext-dns context is finished.

This function should be called after creating a listener (o listeners) calling to ext_dns_listener_new to block current thread.

This function can be avoided if the program structure can ensure that the programm will not exist after calling ext_dns_listener_new. This happens when the program is linked to (or implements) and internal event loop.

This function will be unblocked when the ext-dns servers created ends or a failure have occur while creating the listener. To force an unlocking, a call to ext_dns_ctx_unlock must be done.

Parameters
ctxThe context where the operation will be performed.

References ext_dns_async_queue_new(), ext_dns_async_queue_pop(), ext_dns_async_queue_unref(), ext_dns_ctx_get_data(), ext_dns_mutex_lock(), and ext_dns_mutex_unlock().