OGRE: Ogre::DefaultWorkQueue Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::DefaultWorkQueue Class Reference

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

`#include <OgreDefaultWorkQueue.h>`

Inheritance diagram for Ogre::DefaultWorkQueue:
[legend]

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

## Additional Inherited Members
Public Types inherited from Ogre::WorkQueue
typedef unsigned long long int | RequestID
| Numeric identifier for a request.

## 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 | ) |

References Ogre::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

  forceRestart | If 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:

- OgreDefaultWorkQueue.h