Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions
nsStressRunner Class Reference
Inheritance diagram for nsStressRunner:
Inheritance graph
[legend]
Collaboration diagram for nsStressRunner:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_DECL_ISUPPORTS NS_IMETHOD Run ()
 Defines an entry point for a newly created thread.
 nsStressRunner (int num)
void run ()

Static Public Member Functions

static PRInt32 GetGlobalCount ()

Protected Attributes

PRInt32 mNum
PRBool mWasRun

Static Protected Attributes

static PRInt32 gNum = 0

Private Member Functions

 ~nsStressRunner ()

Detailed Description

Definition at line 134 of file TestThreads.cpp.


Constructor & Destructor Documentation

Definition at line 148 of file TestThreads.cpp.

Here is the call graph for this function:

nsStressRunner::~nsStressRunner ( ) [inline, private]

Definition at line 155 of file TestThreads.cpp.

                      {
        NS_ASSERTION(mWasRun, "never run!");
    }

Member Function Documentation

static PRInt32 nsStressRunner::GetGlobalCount ( ) [inline, static]

Definition at line 152 of file TestThreads.cpp.

{return gNum;}

Here is the caller graph for this function:

void nsIRunnable::run ( ) [inherited]

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Definition at line 138 of file TestThreads.cpp.

                     {
        NS_ASSERTION(!mWasRun, "run twice!");
        mWasRun = PR_TRUE;
        PR_Sleep(1);
        if (!PR_AtomicDecrement(&gNum)) {
            printf("   last thread was %d\n", mNum);
        }
        return NS_OK;
    }

Here is the call graph for this function:


Member Data Documentation

PRInt32 nsStressRunner::gNum = 0 [static, protected]

Definition at line 160 of file TestThreads.cpp.

Definition at line 161 of file TestThreads.cpp.

Definition at line 162 of file TestThreads.cpp.


The documentation for this class was generated from the following file: