sbRunnable_< ResultType > Class Template Referenceabstract

#include <sbThreadUtils.h>

Inheritance diagram for sbRunnable_< ResultType >:
[legend]
Collaboration diagram for sbRunnable_< ResultType >:
[legend]

Public Member Functions

 sbRunnable_ (const char *aName)
 
NS_IMETHOD Run ()
 
ResultType Wait ()
 
PRBool Wait (PRIntervalTime aTimeout, ResultType &aResult)
 
- Public Member Functions inherited from sbRunnable
 sbRunnable (const char *aName)
 
NS_IMETHOD Run ()
 
PRBool Wait (PRIntervalTime aTimeout)
 

Protected Member Functions

virtual ResultType OnRun ()=0
 

Detailed Description

template<typename ResultType>
class sbRunnable_< ResultType >

A subclass template of sbRunnable that can return a result.

Definition at line 774 of file sbThreadUtils.h.

Constructor & Destructor Documentation

template<typename ResultType >
sbRunnable_< ResultType >::sbRunnable_ ( const char *  aName)
inline

Definition at line 780 of file sbThreadUtils.h.

Member Function Documentation

template<typename ResultType >
NS_IMETHOD sbRunnable_< ResultType >::Run ( )
inline

nsIRunnable run method. Delegates to OnRun(). Subclasses must override OnRun(), not this function.

Definition at line 790 of file sbThreadUtils.h.

Here is the call graph for this function:

template<typename ResultType >
ResultType sbRunnable_< ResultType >::Wait ( )
inline

Waits indefinitely for OnRun() to complete and returns its result.

Definition at line 802 of file sbThreadUtils.h.

Here is the caller graph for this function:

template<typename ResultType >
PRBool sbRunnable_< ResultType >::Wait ( PRIntervalTime  aTimeout,
ResultType &  aResult 
)
inline

Returns true if OnRun() completes before the timeout lapses, or false otherwise. If true, returns the result of OnRun() in aResult.

Definition at line 815 of file sbThreadUtils.h.

Here is the call graph for this function:


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