Back to index

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

List of all members.

Public Member Functions

 AsyncWriteThread (mozIStorageService *aStorageService)
NS_DECL_ISUPPORTS NS_IMETHOD Run ()
 Defines an entry point for a newly created thread.
void run ()

Protected Attributes

nsCOMPtr< mozIStorageServicemStorageService

Detailed Description

Definition at line 460 of file mozStorageAsyncIO.cpp.


Constructor & Destructor Documentation

AsyncWriteThread::AsyncWriteThread ( mozIStorageService aStorageService) [inline]

Definition at line 463 of file mozStorageAsyncIO.cpp.

                                                        :
    mStorageService(aStorageService) {}

Member Function Documentation

void nsIRunnable::run ( ) [inherited]

Defines an entry point for a newly created thread.

Implements nsIRunnable.

Definition at line 468 of file mozStorageAsyncIO.cpp.

  {
    NS_ASSERTION(! AsyncWriterHaltWhenIdle, "You don't want halt on idle when starting up!");
    ProcessAsyncMessages();

    // this will delay processing the release of the storage service until we
    // get to the main thread.
    nsCOMPtr<nsIEventQueue> eventQueue;
    nsresult rv = NS_GetMainEventQ(getter_AddRefs(eventQueue));
    if (NS_SUCCEEDED(rv)) {
      mozIStorageService* service = nsnull;
      mStorageService.swap(service);
      NS_ProxyRelease(eventQueue, service);
    } else {
      NS_NOTREACHED("No event queue");
    }
    return NS_OK;
  }

Here is the call graph for this function:


Member Data Documentation

Definition at line 492 of file mozStorageAsyncIO.cpp.


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