osgEarth 2.1.1
Public Member Functions | Public Attributes

osgEarth::ParallelTask< T > Struct Template Reference

Inheritance diagram for osgEarth::ParallelTask< T >:
Collaboration diagram for osgEarth::ParallelTask< T >:

List of all members.

Public Member Functions

 ParallelTask ()
 ParallelTask (Threading::MultiEvent *ev)
 ParallelTask (Threading::Event *ev)
void operator() (ProgressCallback *pc)

Public Attributes

Threading::MultiEvent_mev
Threading::Event_sev

Detailed Description

template<typename T>
struct osgEarth::ParallelTask< T >

Convenience template for creating a task that synchronized with an event. Initialze multiple ParallelTask's with a common MultiEvent (semaphore) to run them in parallel and wait for them all to complete.

Definition at line 103 of file TaskService.


Constructor & Destructor Documentation

template<typename T>
osgEarth::ParallelTask< T >::ParallelTask ( ) [inline]

Definition at line 105 of file TaskService.

: _mev(0L), _sev(0L) { }
template<typename T>
osgEarth::ParallelTask< T >::ParallelTask ( Threading::MultiEvent ev) [inline]

Definition at line 106 of file TaskService.

: _mev(ev), _sev(0L) { }
template<typename T>
osgEarth::ParallelTask< T >::ParallelTask ( Threading::Event ev) [inline]

Definition at line 107 of file TaskService.

: _sev(ev), _mev(0L) { }

Member Function Documentation

template<typename T>
void osgEarth::ParallelTask< T >::operator() ( ProgressCallback pc) [inline, virtual]

Implements osgEarth::TaskRequest.

Definition at line 109 of file TaskService.

        {
            this->execute();
            if ( _mev )
                _mev->notify();
            else if ( _sev )
                _sev->set();
        }

Here is the call graph for this function:


Member Data Documentation

template<typename T>
Threading::MultiEvent* osgEarth::ParallelTask< T >::_mev

Definition at line 118 of file TaskService.

template<typename T>
Threading::Event* osgEarth::ParallelTask< T >::_sev

Definition at line 119 of file TaskService.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines