tor-browser

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

pr_detachthread.rst (1372B)


      1 PR_DetachThread
      2 ===============
      3 
      4 .. container:: blockIndicator obsolete obsoleteHeader
      5 
      6   | **Obsolete**
      7   | This feature is obsolete. Although it may still work in some
      8     browsers, its use is discouraged since it could be removed at any
      9     time. Try to avoid using it.
     10 
     11 Disassociates a PRThread object from a native thread.
     12 
     13 
     14 Syntax
     15 ------
     16 
     17 .. code::
     18 
     19   #include <pprthread.h>
     20 
     21   void PR_DetachThread(void);
     22 
     23 
     24 Parameters
     25 ~~~~~~~~~~
     26 
     27 PR_DetachThread has no parameters.
     28 
     29 
     30 Returns
     31 ~~~~~~~
     32 
     33 The function returns nothing.
     34 
     35 
     36 Description
     37 -----------
     38 
     39 This function detaches the NSPR thread from the currently executing
     40 native thread. The thread object and all related data attached to it are
     41 destroyed. The exit process is invoked. The call returns after the NSPR
     42 thread object is destroyed.
     43 
     44 This call is needed only if you attached the thread using
     45 :ref:`PR_AttachThread`.
     46 
     47 .. note::
     48 
     49   As of NSPR release v3.0, :ref:`PR_AttachThread` and
     50   :ref:`PR_DetachThread` are obsolete. A native thread not created by NSPR
     51   is automatically attached the first time it calls an NSPR function,
     52   and automatically detached when it exits.
     53 
     54 In NSPR release 19980529B and earlier, it is necessary for a native
     55 thread not created by NSPR to call :ref:`PR_AttachThread` before it calls
     56 any NSPR functions, and call :ref:`PR_DetachThread` when it is done calling
     57 NSPR functions.