tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

prthreadtype.rst (951B)


      1 PRThreadType
      2 ============
      3 
      4 The type of an NSPR thread, specified as a parameter to
      5 :ref:`PR_CreateThread`.
      6 
      7 
      8 Syntax
      9 ------
     10 
     11 .. code::
     12 
     13   #include <prthread.h>
     14 
     15   typedef enum PRThreadType {
     16      PR_USER_THREAD,
     17      PR_SYSTEM_THREAD
     18   } PRThreadType;
     19 
     20 
     21 Enumerators
     22 ~~~~~~~~~~~
     23 
     24 ``PR_USER_THREAD``
     25   :ref:`PR_Cleanup` blocks until the last thread of type
     26   ``PR_USER_THREAD`` terminates.
     27 ``PR_SYSTEM_THREAD``
     28   NSPR ignores threads of type ``PR_SYSTEM_THREAD`` when determining
     29   when a call to :ref:`PR_Cleanup` should return.
     30 
     31 
     32 Description
     33 -----------
     34 
     35 Threads can be either user threads or system threads. NSPR allows the
     36 client to synchronize the termination of all user threads and ignores
     37 those created as system threads. This arrangement implies that a system
     38 thread should not have volatile data that needs to be safely stored
     39 away. The applicability of system threads is somewhat dubious;
     40 therefore, they should be used with caution.