Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Protected Attributes
nsRunner Class Reference
Inheritance diagram for nsRunner:
Inheritance graph
Collaboration diagram for nsRunner:
Collaboration graph

List of all members.

Public Member Functions

 Defines an entry point for a newly created thread.
 nsRunner (int num)
void run ()

Protected Attributes

int mNum

Detailed Description

Definition at line 47 of file TestThreads.cpp.

Constructor & Destructor Documentation

nsRunner::nsRunner ( int  num) [inline]

Definition at line 67 of file TestThreads.cpp.

                      : mNum(num) {

Member Function Documentation

void nsIRunnable::run ( ) [inherited]

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Definition at line 51 of file TestThreads.cpp.

        nsCOMPtr<nsIThread> thread;
        nsresult rv = nsIThread::GetCurrent(getter_AddRefs(thread));
        if (NS_FAILED(rv)) {
            printf("failed to get current thread\n");
            return rv;
        printf("running %d on thread %p\n", mNum, (void *)thread.get());

        // if we don't do something slow, we'll never see the other
        // worker threads run

        return rv;

Here is the call graph for this function:

Member Data Documentation

int nsRunner::mNum [protected]

Definition at line 71 of file TestThreads.cpp.

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