OGRE  master
Object-Oriented Graphics Rendering Engine
Ogre::DefaultWorkQueue Class Reference

Implementation of a general purpose request / response style background work queue. More...

#include <OgreDefaultWorkQueue.h>

+ Inheritance diagram for Ogre::DefaultWorkQueue:

Public Member Functions

 DefaultWorkQueue (const String &name=BLANKSTRING)
 
virtual ~DefaultWorkQueue ()
 
void _threadMain () override
 Main function for each thread spawned. More...
 
void shutdown () override
 Shut down the queue. More...
 
void startup (bool forceRestart=true) override
 Start up the queue with the options that have been set. More...
 
- Public Member Functions inherited from Ogre::DefaultWorkQueueBase
 DefaultWorkQueueBase (const String &name=BLANKSTRING)
 Constructor. More...
 
virtual ~DefaultWorkQueueBase ()
 
virtual void _processNextRequest ()
 Process the next request on the queue. More...
 
void addMainThreadTask (std::function< void()> task) override
 Add a deferred task that will be processed on the main render thread. More...
 
void addTask (std::function< void()> task) override
 Add a new task to the queue. More...
 
const StringgetName () const
 Get the name of the work queue. More...
 
virtual bool getRequestsAccepted () const override
 Returns whether requests are being accepted right now. More...
 
unsigned long getResponseProcessingTimeLimit () const override
 
virtual bool getWorkersCanAccessRenderSystem () const
 Get whether worker threads will be allowed to access render system resources. More...
 
size_t getWorkerThreadCount () const override
 Get the number of worker threads that this queue will start when startup() is called. More...
 
bool isPaused () const override
 Return whether the queue is paused ie not sending more work to workers. More...
 
virtual bool isShuttingDown () const
 Returns whether the queue is trying to shut down. More...
 
void processMainThreadTasks () override
 Process the tasks in the main-thread queue. More...
 
void setPaused (bool pause) override
 Set whether to pause further processing of any requests. More...
 
void setRequestsAccepted (bool accept) override
 Set whether to accept new requests or not. More...
 
void setResponseProcessingTimeLimit (unsigned long ms) override
 
virtual void setWorkersCanAccessRenderSystem (bool access)
 Set whether worker threads will be allowed to access render system resources. More...
 
void setWorkerThreadCount (size_t c) override
 Set the number of worker threads that this queue will start when startup() is called (default 1). More...
 
- Public Member Functions inherited from Ogre::WorkQueue
 WorkQueue ()
 
virtual ~WorkQueue ()
 
uint64 getMainThreadProcessingTimeLimit () const
 Get the time limit imposed on the processing of tasks in a single frame, in milliseconds (0 indicates no limit). More...
 
virtual void processResponses ()
 
void setMainThreadProcessingTimeLimit (uint64 ms)
 Set the time limit imposed on the processing of tasks in a single frame, in milliseconds (0 indicates no limit). More...
 

Additional Inherited Members

- Public Types inherited from Ogre::WorkQueue
typedef unsigned long long int RequestID
 Numeric identifier for a request. More...
 

Detailed Description

Implementation of a general purpose request / response style background work queue.

This default implementation of a work queue starts a thread pool and provides queues to process requests.

Constructor & Destructor Documentation

◆ DefaultWorkQueue()

Ogre::DefaultWorkQueue::DefaultWorkQueue ( const String name = BLANKSTRING)

◆ ~DefaultWorkQueue()

virtual Ogre::DefaultWorkQueue::~DefaultWorkQueue ( )
virtual

Member Function Documentation

◆ _threadMain()

void Ogre::DefaultWorkQueue::_threadMain ( )
overridevirtual

Main function for each thread spawned.

Implements Ogre::DefaultWorkQueueBase.

◆ shutdown()

void Ogre::DefaultWorkQueue::shutdown ( )
overridevirtual

Shut down the queue.

Implements Ogre::WorkQueue.

◆ startup()

void Ogre::DefaultWorkQueue::startup ( bool  forceRestart = true)
overridevirtual

Start up the queue with the options that have been set.

Parameters
forceRestartIf the queue is already running, whether to shut it down and restart.

Implements Ogre::WorkQueue.


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