VR-Forces 4.2 Class Documentation
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
DtAsyncJobServer Class Reference

Manages async job objects. More...

Public Member Functions

 DtAsyncJobServer ()
 CTOR.
virtual ~DtAsyncJobServer ()
 Virtual DTOR.
virtual boost::shared_ptr
< DtAsyncJobMapEntry
addJob (DtAsyncJob *job)
 Add a job to the queue.
virtual void cancelAllJobs ()
 Set all jobs to cancelled.
virtual bool empty () const
 Check to see if there are any jobs in the queue.
virtual bool running () const
 Are there currently jobs which are waiting to run or haven't completed?
virtual void printAsyncJobMap ()
 Prints async job IDs and status.

Protected Member Functions

virtual size_t getNextId ()
 Get the next id.
virtual void remove (size_t id)
 Remove id immediately.
virtual void jobDestroyed (DtAsyncJob &)
 DtAsyncJob object added previously has been destroyed.

Protected Attributes

DtAsyncJobMap myAsyncJobMap
tbb::spin_mutex myIdGenMutex
size_t myNextId
tbb::spin_mutex myNumTasksMutex
size_t myNumTasks

Friends

class DtAsyncJobMapEntry
class DtAsyncJob

Detailed Description

Manages async job objects.

The server must not be deleted before all of its jobs have completed.

Constructor & Destructor Documentation

DtAsyncJobServer::DtAsyncJobServer ( )

CTOR.

virtual DtAsyncJobServer::~DtAsyncJobServer ( )
virtual

Virtual DTOR.

Member Function Documentation

virtual boost::shared_ptr<DtAsyncJobMapEntry> DtAsyncJobServer::addJob ( DtAsyncJob job)
virtual

Add a job to the queue.

Make sure it has been allocated with tbb placement new allocator.

virtual void DtAsyncJobServer::cancelAllJobs ( )
virtual

Set all jobs to cancelled.

virtual bool DtAsyncJobServer::empty ( ) const
virtual

Check to see if there are any jobs in the queue.

virtual bool DtAsyncJobServer::running ( ) const
virtual

Are there currently jobs which are waiting to run or haven't completed?

virtual void DtAsyncJobServer::printAsyncJobMap ( )
virtual

Prints async job IDs and status.

virtual size_t DtAsyncJobServer::getNextId ( )
protectedvirtual

Get the next id.

virtual void DtAsyncJobServer::remove ( size_t  id)
protectedvirtual

Remove id immediately.

virtual void DtAsyncJobServer::jobDestroyed ( DtAsyncJob )
protectedvirtual

DtAsyncJob object added previously has been destroyed.

Friends And Related Function Documentation

friend class DtAsyncJobMapEntry
friend
friend class DtAsyncJob
friend

Member Data Documentation

DtAsyncJobMap DtAsyncJobServer::myAsyncJobMap
protected
tbb::spin_mutex DtAsyncJobServer::myIdGenMutex
mutableprotected
size_t DtAsyncJobServer::myNextId
protected
tbb::spin_mutex DtAsyncJobServer::myNumTasksMutex
mutableprotected
size_t DtAsyncJobServer::myNumTasks
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)