Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions
nsIThreadManager Class Reference

#include <nsIThreadManager.h>

Inheritance diagram for nsIThreadManager:
Inheritance graph
[legend]
Collaboration diagram for nsIThreadManager:
Collaboration graph
[legend]

List of all members.

Public Member Functions

NS_IMETHOD GetCurrentThread (PRThread **threadID)=0
 Returns a unique identifier for the "current" system thread.
NS_IMETHOD Sleep (PRUint32 milli=0)=0
 Pauses the current thread for the specified number of milliseconds.
NS_IMETHOD EnterMonitor (void *address)=0
 Creates a unique monitor for the specified address, and makes the current system thread the owner of the monitor.
NS_IMETHOD ExitMonitor (void *address)=0
 Exits the monitor associated with the address.
NS_IMETHOD Wait (void *address, PRUint32 milli=0)=0
 Waits on the monitor associated with the address (must be entered already).
NS_IMETHOD Notify (void *address)=0
 Notifies a single thread waiting on the monitor associated with the address (must be entered already).
NS_IMETHOD NotifyAll (void *address)=0
 Notifies all threads waiting on the monitor associated with the address (must be entered already).
NS_IMETHOD CreateThread (PRThread **thread, nsIRunnable *runnable)=0
 Creates a new thread, calling the specified runnable's Run method (a la Java).
NS_IMETHOD PostEvent (PRThread *thread, nsIRunnable *runnable, PRBool async)=0
 Posts an event to specified thread, calling the runnable from that thread.

Detailed Description

Definition at line 60 of file nsIThreadManager.h.


Member Function Documentation

NS_IMETHOD nsIThreadManager::CreateThread ( PRThread **  thread,
nsIRunnable runnable 
) [pure virtual]

Creates a new thread, calling the specified runnable's Run method (a la Java).

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::EnterMonitor ( void address) [pure virtual]

Creates a unique monitor for the specified address, and makes the current system thread the owner of the monitor.

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::ExitMonitor ( void address) [pure virtual]

Exits the monitor associated with the address.

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::GetCurrentThread ( PRThread **  threadID) [pure virtual]

Returns a unique identifier for the "current" system thread.

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::Notify ( void address) [pure virtual]

Notifies a single thread waiting on the monitor associated with the address (must be entered already).

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::NotifyAll ( void address) [pure virtual]

Notifies all threads waiting on the monitor associated with the address (must be entered already).

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::PostEvent ( PRThread thread,
nsIRunnable runnable,
PRBool  async 
) [pure virtual]

Posts an event to specified thread, calling the runnable from that thread.

Parameters:
threadIDthread to call runnable from
runnableobject to invoke from thread
asyncif true, won't block current thread waiting for result

Implemented in nsJVMManager.

NS_IMETHOD nsIThreadManager::Sleep ( PRUint32  milli = 0) [pure virtual]

Pauses the current thread for the specified number of milliseconds.

If milli is zero, then merely yields the CPU if another thread of greater or equal priority.

Implemented in nsJVMManager.

Here is the caller graph for this function:

NS_IMETHOD nsIThreadManager::Wait ( void address,
PRUint32  milli = 0 
) [pure virtual]

Waits on the monitor associated with the address (must be entered already).

If milli is 0, wait indefinitely.

Implemented in nsJVMManager.

Here is the caller graph for this function:


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