getdns Functions
PHP Manual

php_getdns_context_set_use_threads

(PECL getdns >= 0.10.0)

php_getdns_context_set_use_threadsSet underlying unbound library asynchronous processing behavior.

Description

int php_getdns_context_set_use_threads ( int $context , bool $useThreads )

This function sets a context behaviour for asynchronous action by the unbound library that the getdns library depends on. The value of the useThreads parameter determines if libunbound will use background threads or a forked process to handle work in the background.

Parameters

context

The previously created DNS context that is to be used with this request.

useThreads

This value must be either TRUE or FALSE. If TRUE, libunbound will create a thread to handle work in the background. If FALSE, a process is forked to handle work in the background.

Return Values

This function returns an integer response code. GETDNS_RETURN_GOOD indicates successful completion.


getdns Functions
PHP Manual