quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

ares_threadsafety.3 (1249B)


      1 .\"
      2 .\" Copyright 2023 by the c-ares project and its contributors
      3 .\" SPDX-License-Identifier: MIT
      4 .\"
      5 .TH ARES_THREADSAFETY 3 "26 November 2023"
      6 .SH NAME
      7 ares_threadsafety \- Query if c-ares was built with thread-safety
      8 .SH SYNOPSIS
      9 .nf
     10 #include <ares.h>
     11 
     12 ares_bool_t ares_threadsafety(void);
     13 .fi
     14 .SH DESCRIPTION
     15 The \fBares_threadsafety(3)\fP function returns if the library was built with
     16 thread safety enabled or not.
     17 
     18 As of c-ares 1.23.0, this simply means that every public function which
     19 references an \fIares_channel_t\fP object will lock the channel on entry and
     20 release the lock on exit of the function.  This will prevent concurrent
     21 thread access to the channel, thus ensuring no corruption can occur.
     22 
     23 As of c-ares 1.26.0, this also indicates if \fBARES_OPT_EVENT_THREAD\fP can
     24 be passed to \fIares_init_options(3)\fP.
     25 
     26 .SH RETURN VALUES
     27 \fIares_threadsafety(3)\fP can return any of the following values:
     28 .TP 14
     29 .B ARES_TRUE
     30 Built with thread safety.
     31 .TP 14
     32 .B ARES_FALSE
     33 Built without thread safety
     34 .TP 14
     35 
     36 .SH AVAILABILITY
     37 This function was first introduced in c-ares version 1.23.0.
     38 .SH SEE ALSO
     39 .BR ares_init (3),
     40 .BR ares_init_options (3),
     41 .BR ares_destroy (3),
     42 .BR ares_dup (3),
     43 .BR ares_library_init (3),
     44 .BR ares_set_servers (3)