tor-browser

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

pr_notifyall.rst (935B)


      1 PR_NotifyAll
      2 ============
      3 
      4 Promotes all threads waiting on a specified monitor to a ready state.
      5 
      6 
      7 Syntax
      8 ------
      9 
     10 .. code::
     11 
     12   #include <prmon.h>
     13 
     14   PRStatus PR_NotifyAll(PRMonitor *mon);
     15 
     16 
     17 Parameters
     18 ~~~~~~~~~~
     19 
     20 The function has the following parameter:
     21 
     22 ``mon``
     23   A reference to an existing structure of type :ref:`PRMonitor`. The
     24   monitor object referenced must be one for which the calling thread
     25   currently holds the lock.
     26 
     27 
     28 Returns
     29 ~~~~~~~
     30 
     31 The function returns one of the following values:
     32 
     33 -  If successful, ``PR_SUCCESS``.
     34 -  If unsuccessful, ``PR_FAILURE``.
     35 
     36 
     37 Description
     38 -----------
     39 
     40 A call to :ref:`PR_NotifyAll` causes all of the threads waiting on the
     41 monitor to be scheduled to be promoted to a ready state. If no threads
     42 are waiting, the operation is no-op.
     43 
     44 :ref:`PR_NotifyAll` should be used with some care. The expense of
     45 scheduling multiple threads increases dramatically as the number of
     46 threads increases.