Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
ARES_THREADSAFETY(3)	    Library Functions Manual	    ARES_THREADSAFETY(3)

NAME
     ares_threadsafety - Query if c-ares was built with thread-safety

SYNOPSIS
     #include <ares.h>

     ares_bool_t ares_threadsafety(void);

DESCRIPTION
     The  ares_threadsafety(3)	function  returns  if the library was built with
     thread safety enabled or not.

     As of c-ares 1.23.0, this simply means that  every  public  function  which
     references  an ares_channel_t object will lock the channel on entry and re-
     lease the lock on exit of	the  function.	 This  will  prevent  concurrent
     thread access to the channel, thus ensuring no corruption can occur.

     As  of  c-ares  1.26.0, this also indicates if ARES_OPT_EVENT_THREAD can be
     passed to ares_init_options(3).

RETURN VALUES
     ares_threadsafety(3) can return any of the following values:

     ARES_TRUE	   Built with thread safety.

     ARES_FALSE    Built without thread safety

     AVAILABILITY
	    This function was first introduced in c-ares version 1.23.0.

SEE ALSO
     ares_init(3), ares_init_options(3), ares_destroy(3), ares_dup(3),	ares_li-
     brary_init(3), ares_set_servers(3)

				26 November 2023	    ARES_THREADSAFETY(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=ares_threadsafety&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help