\hypertarget{class_ogre_1_1_work_queue}{}\doxysection{Ogre\+::Work\+Queue Class Reference}
\label{class_ogre_1_1_work_queue}\index{Ogre::WorkQueue@{Ogre::WorkQueue}}


Interface to a general purpose request / response style background work queue.  




{\ttfamily \#include $<$Ogre\+Work\+Queue.\+h$>$}



Inheritance diagram for Ogre\+::Work\+Queue\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=242pt]{class_ogre_1_1_work_queue__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}}
\begin{DoxyCompactList}\small\item\em General purpose request structure. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler}{Request\+Handler}}
\begin{DoxyCompactList}\small\item\em Interface definition for a handler of requests. \end{DoxyCompactList}\item 
struct \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}}
\begin{DoxyCompactList}\small\item\em General purpose response structure. \end{DoxyCompactList}\item 
class \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_response_handler}{Response\+Handler}}
\begin{DoxyCompactList}\small\item\em Interface definition for a handler of responses. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef unsigned long long int \mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}}
\begin{DoxyCompactList}\small\item\em Numeric identifier for a request. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_work_queue_a522d959bdec37026c5ad9eb2e2b189cc}{Work\+Queue}} ()
\item 
virtual \mbox{\hyperlink{class_ogre_1_1_work_queue_a2e7a64f2d114bf2828355e83e43f8172}{$\sim$\+Work\+Queue}} ()
\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_aae92816d648918690f76f6fe14f125c0}{abort\+All\+Requests}} ()=0
\begin{DoxyCompactList}\small\item\em Abort all previously issued requests. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_work_queue_a96f12a032fddb17f2fc6a0f519c5d479}{abort\+Pending\+Request}} (\mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}} id)=0
\begin{DoxyCompactList}\small\item\em Abort request if it is not being processed currently. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_afe710c55a31c661f738abb2cc5c7303e}{abort\+Pending\+Requests\+By\+Channel}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel)=0
\begin{DoxyCompactList}\small\item\em Abort all previously issued requests in a given channel. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_a5c3f58ddc03546ba2a5c510cbca0aae6}{abort\+Request}} (\mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}} id)=0
\begin{DoxyCompactList}\small\item\em Abort a previously issued request. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_ac885db05201bde87b65c27e1b7cf8af4}{abort\+Requests\+By\+Channel}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel)=0
\begin{DoxyCompactList}\small\item\em Abort all previously issued requests in a given channel. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}} \mbox{\hyperlink{class_ogre_1_1_work_queue_ac8abc5abf22d01f0fd86efb43f5f0d39}{add\+Request}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel, \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} request\+Type, const \mbox{\hyperlink{class_ogre_1_1_any}{Any}} \&r\+Data, \mbox{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}} retry\+Count=0, bool force\+Synchronous=false, bool idle\+Thread=false)=0
\begin{DoxyCompactList}\small\item\em Add a new request to the queue. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_aa0687acbbe081ba2a3ae3c3bdbfca6ff}{add\+Request\+Handler}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel, \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler}{Request\+Handler}} $\ast$rh)=0
\begin{DoxyCompactList}\small\item\em Add a request handler instance to the queue. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_ac7a22c908d9859d29c22fc8b73a7c735}{add\+Response\+Handler}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel, \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_response_handler}{Response\+Handler}} $\ast$rh)=0
\begin{DoxyCompactList}\small\item\em Add a response handler instance to the queue. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} \mbox{\hyperlink{class_ogre_1_1_work_queue_a9a550b2e870c3cf2fb7dc6732ceed3e5}{get\+Channel}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&channel\+Name)
\begin{DoxyCompactList}\small\item\em Get a channel ID for a given channel name. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_work_queue_abc8685f2e0f4921468f8cf7cb5f2b2b3}{get\+Requests\+Accepted}} () const =0
\begin{DoxyCompactList}\small\item\em Returns whether requests are being accepted right now. \end{DoxyCompactList}\item 
virtual unsigned long \mbox{\hyperlink{class_ogre_1_1_work_queue_a9b605e17372e8a45eab9471955979d4a}{get\+Response\+Processing\+Time\+Limit}} () const =0
\begin{DoxyCompactList}\small\item\em Get the time limit imposed on the processing of responses in a single frame, in milliseconds (0 indicates no limit). \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_work_queue_a79a71d8b70010d28043a2fef2c3e2cf8}{is\+Paused}} () const =0
\begin{DoxyCompactList}\small\item\em Return whether the queue is paused ie not sending more work to workers. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_aa4c64bf597bd87860dc297f0ac7af463}{process\+Responses}} ()=0
\begin{DoxyCompactList}\small\item\em Process the responses in the queue. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_aae885bf0b8988f2353659d896bfa6b78}{remove\+Request\+Handler}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel, \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler}{Request\+Handler}} $\ast$rh)=0
\begin{DoxyCompactList}\small\item\em Remove a request handler. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_ab8160c231f7f7706030432c3c585e589}{remove\+Response\+Handler}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} channel, \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_response_handler}{Response\+Handler}} $\ast$rh)=0
\begin{DoxyCompactList}\small\item\em Remove a \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} handler. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_a414eb873108df39549cc79d8246994d3}{set\+Paused}} (bool pause)=0
\begin{DoxyCompactList}\small\item\em Set whether to pause further processing of any requests. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_a1fd22283445612a4d0e020917f1582b9}{set\+Requests\+Accepted}} (bool accept)=0
\begin{DoxyCompactList}\small\item\em Set whether to accept new requests or not. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_a9b631e09dcaafb4a341eff307f00feca}{set\+Response\+Processing\+Time\+Limit}} (unsigned long ms)=0
\begin{DoxyCompactList}\small\item\em Set the time limit imposed on the processing of responses in a single frame, in milliseconds (0 indicates no limit). \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_a42d64d8891849878e3d1afb66fa0ce19}{shutdown}} ()=0
\begin{DoxyCompactList}\small\item\em Shut down the queue. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_work_queue_ad6d7aeeb4b1e4e8eed931cb17d63add3}{startup}} (bool force\+Restart=true)=0
\begin{DoxyCompactList}\small\item\em Start up the queue with the options that have been set. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Interface to a general purpose request / response style background work queue. 

\begin{DoxyRemark}{Remarks}
A work queue is a simple structure, where requests for work are placed onto the queue, then removed by a worker for processing, then finally a response is placed on the result queue for the originator to pick up at their leisure. The typical use for this is in a threaded environment, although any kind of deferred processing could use this approach to decouple and distribute work over a period of time even if it was single threaded. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
Work\+Queues also incorporate thread pools. One or more background worker threads can wait on the queue and be notified when a request is waiting to be processed. For maximal thread usage, a \mbox{\hyperlink{class_ogre_1_1_work_queue}{Work\+Queue}} instance should be shared among many sources of work, rather than many work queues being created. This way, you can share a small number of hardware threads among a large number of background tasks. This doesn\textquotesingle{}t mean you have to implement all the request processing in one class, you can plug in many handlers in order to process the requests. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{}
This is an abstract interface definition; users can subclass this and provide their own implementation if required to centralise task management in their own subsystems. We also provide a default implementation in the form of \mbox{\hyperlink{class_ogre_1_1_default_work_queue}{Default\+Work\+Queue}}. 
\end{DoxyParagraph}


\doxysubsection{Member Typedef Documentation}
\mbox{\Hypertarget{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}\label{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!RequestID@{RequestID}}
\index{RequestID@{RequestID}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{RequestID}{RequestID}}
{\footnotesize\ttfamily typedef unsigned long long int \mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Ogre\+::\+Work\+Queue\+::\+Request\+ID}}}



Numeric identifier for a request. 



\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_work_queue_a522d959bdec37026c5ad9eb2e2b189cc}\label{class_ogre_1_1_work_queue_a522d959bdec37026c5ad9eb2e2b189cc}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!WorkQueue@{WorkQueue}}
\index{WorkQueue@{WorkQueue}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{WorkQueue()}{WorkQueue()}}
{\footnotesize\ttfamily Ogre\+::\+Work\+Queue\+::\+Work\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a2e7a64f2d114bf2828355e83e43f8172}\label{class_ogre_1_1_work_queue_a2e7a64f2d114bf2828355e83e43f8172}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!````~WorkQueue@{$\sim$WorkQueue}}
\index{````~WorkQueue@{$\sim$WorkQueue}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{$\sim$WorkQueue()}{~WorkQueue()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Work\+Queue\+::$\sim$\+Work\+Queue (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_work_queue_ad6d7aeeb4b1e4e8eed931cb17d63add3}\label{class_ogre_1_1_work_queue_ad6d7aeeb4b1e4e8eed931cb17d63add3}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!startup@{startup}}
\index{startup@{startup}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{startup()}{startup()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::startup (\begin{DoxyParamCaption}\item[{bool}]{force\+Restart = {\ttfamily true} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



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


\begin{DoxyParams}{Parameters}
{\em force\+Restart} & If the queue is already running, whether to shut it down and restart. \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_a1a0f33724027da3501c0c8b8182480cf}{Ogre\+::\+Default\+Work\+Queue}}, and \mbox{\hyperlink{class_ogre_1_1_default_work_queue_a1a0f33724027da3501c0c8b8182480cf}{Ogre\+::\+Default\+Work\+Queue}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_aa0687acbbe081ba2a3ae3c3bdbfca6ff}\label{class_ogre_1_1_work_queue_aa0687acbbe081ba2a3ae3c3bdbfca6ff}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!addRequestHandler@{addRequestHandler}}
\index{addRequestHandler@{addRequestHandler}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{addRequestHandler()}{addRequestHandler()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::add\+Request\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel,  }\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler}{Request\+Handler}} $\ast$}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Add a request handler instance to the queue. 

\begin{DoxyRemark}{Remarks}
Every queue must have at least one request handler instance for each channel in which requests are raised. If you add more than one handler per channel, then you must implement can\+Handle\+Request differently in each if you wish them to respond to different requests. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em channel} & The channel for requests you want to handle \\
\hline
{\em rh} & Your handler \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a7fc21f1afa5edb2a919f8ba2febfb1a3}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_aae885bf0b8988f2353659d896bfa6b78}\label{class_ogre_1_1_work_queue_aae885bf0b8988f2353659d896bfa6b78}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!removeRequestHandler@{removeRequestHandler}}
\index{removeRequestHandler@{removeRequestHandler}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{removeRequestHandler()}{removeRequestHandler()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::remove\+Request\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel,  }\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request_handler}{Request\+Handler}} $\ast$}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Remove a request handler. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a1f0847f5d8a4f9e4703a390acacfaa84}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_ac7a22c908d9859d29c22fc8b73a7c735}\label{class_ogre_1_1_work_queue_ac7a22c908d9859d29c22fc8b73a7c735}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!addResponseHandler@{addResponseHandler}}
\index{addResponseHandler@{addResponseHandler}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{addResponseHandler()}{addResponseHandler()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::add\+Response\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel,  }\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_response_handler}{Response\+Handler}} $\ast$}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Add a response handler instance to the queue. 

\begin{DoxyRemark}{Remarks}
Every queue must have at least one response handler instance for each channel in which requests are raised. If you add more than one, then you must implement can\+Handle\+Response differently in each if you wish them to respond to different responses. 
\end{DoxyRemark}

\begin{DoxyParams}{Parameters}
{\em channel} & The channel for responses you want to handle \\
\hline
{\em rh} & Your handler \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a9e338627cd72591048b9de5a5f4f9770}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_ab8160c231f7f7706030432c3c585e589}\label{class_ogre_1_1_work_queue_ab8160c231f7f7706030432c3c585e589}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!removeResponseHandler@{removeResponseHandler}}
\index{removeResponseHandler@{removeResponseHandler}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{removeResponseHandler()}{removeResponseHandler()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::remove\+Response\+Handler (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel,  }\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_response_handler}{Response\+Handler}} $\ast$}]{rh }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Remove a \mbox{\hyperlink{struct_ogre_1_1_work_queue_1_1_response}{Response}} handler. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_ad8b1cec781199a65accf0024acc2c18a}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_ac8abc5abf22d01f0fd86efb43f5f0d39}\label{class_ogre_1_1_work_queue_ac8abc5abf22d01f0fd86efb43f5f0d39}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!addRequest@{addRequest}}
\index{addRequest@{addRequest}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{addRequest()}{addRequest()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}} Ogre\+::\+Work\+Queue\+::add\+Request (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel,  }\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{request\+Type,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_any}{Any}} \&}]{r\+Data,  }\item[{\mbox{\hyperlink{namespace_ogre_a119732ea9d1e88bbddc47b4ac0fa21cb}{uint8}}}]{retry\+Count = {\ttfamily 0},  }\item[{bool}]{force\+Synchronous = {\ttfamily false},  }\item[{bool}]{idle\+Thread = {\ttfamily false} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Add a new request to the queue. 


\begin{DoxyParams}{Parameters}
{\em channel} & The channel this request will go into = 0; the channel is the top-\/level categorisation of the request \\
\hline
{\em request\+Type} & An identifier that\textquotesingle{}s unique within this queue which identifies the type of the request (user decides the actual value) \\
\hline
{\em r\+Data} & The data required by the request process. \\
\hline
{\em retry\+Count} & The number of times the request should be retried if it fails. \\
\hline
{\em force\+Synchronous} & Forces the request to be processed immediately even if threading is enabled. \\
\hline
{\em idle\+Thread} & \mbox{\hyperlink{class_ogre_1_1_work_queue_1_1_request}{Request}} should be processed on the idle thread. Idle requests will be processed on a single worker thread. You should use this in the following situations\+:
\begin{DoxyEnumerate}
\item If a request handler can\textquotesingle{}t process multiple requests in parallel.
\item If you add lot of requests, but you want to keep the game fast.
\item If you have lot of more important threads. (example\+: physics). 
\end{DoxyEnumerate}\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The ID of the request that has been added 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_aca9fadb9513b1c44286aeb857615a18f}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a5c3f58ddc03546ba2a5c510cbca0aae6}\label{class_ogre_1_1_work_queue_a5c3f58ddc03546ba2a5c510cbca0aae6}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!abortRequest@{abortRequest}}
\index{abortRequest@{abortRequest}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{abortRequest()}{abortRequest()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::abort\+Request (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}}}]{id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Abort a previously issued request. 

If the request is still waiting to be processed, it will be removed from the queue. 
\begin{DoxyParams}{Parameters}
{\em id} & The ID of the previously issued request. \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a634fdd65c89267fc6aeca8e8f6cf5446}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a96f12a032fddb17f2fc6a0f519c5d479}\label{class_ogre_1_1_work_queue_a96f12a032fddb17f2fc6a0f519c5d479}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!abortPendingRequest@{abortPendingRequest}}
\index{abortPendingRequest@{abortPendingRequest}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{abortPendingRequest()}{abortPendingRequest()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Work\+Queue\+::abort\+Pending\+Request (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_ogre_1_1_work_queue_a1908257e726af6caa80f1a6cd5682d76}{Request\+ID}}}]{id }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Abort request if it is not being processed currently. 


\begin{DoxyParams}{Parameters}
{\em id} & The ID of the previously issued request.\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & If request was aborted successfully. \\
\hline
{\em false} & If request is already being processed so it can not be aborted. \\
\hline
\end{DoxyRetVals}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a388ad6e7277319953b9a9982fa2cf4d2}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_ac885db05201bde87b65c27e1b7cf8af4}\label{class_ogre_1_1_work_queue_ac885db05201bde87b65c27e1b7cf8af4}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!abortRequestsByChannel@{abortRequestsByChannel}}
\index{abortRequestsByChannel@{abortRequestsByChannel}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{abortRequestsByChannel()}{abortRequestsByChannel()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::abort\+Requests\+By\+Channel (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Abort all previously issued requests in a given channel. 

\mbox{\hyperlink{class_ogre_1_1_any}{Any}} requests still waiting to be processed of the given channel, will be removed from the queue. Requests which are processed, but response handler is not called will also be removed. 
\begin{DoxyParams}{Parameters}
{\em channel} & The type of request to be aborted \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_ae8cf46d021a09310d1ab96aa1a2c0d08}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_afe710c55a31c661f738abb2cc5c7303e}\label{class_ogre_1_1_work_queue_afe710c55a31c661f738abb2cc5c7303e}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!abortPendingRequestsByChannel@{abortPendingRequestsByChannel}}
\index{abortPendingRequestsByChannel@{abortPendingRequestsByChannel}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{abortPendingRequestsByChannel()}{abortPendingRequestsByChannel()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::abort\+Pending\+Requests\+By\+Channel (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{channel }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Abort all previously issued requests in a given channel. 

\mbox{\hyperlink{class_ogre_1_1_any}{Any}} requests still waiting to be processed of the given channel, will be removed from the queue. It will not remove requests, where the request handler is already called. 
\begin{DoxyParams}{Parameters}
{\em channel} & The type of request to be aborted \\
\hline
\end{DoxyParams}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_ac79ce136b644d7b44b55f4e6ec2542a2}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_aae92816d648918690f76f6fe14f125c0}\label{class_ogre_1_1_work_queue_aae92816d648918690f76f6fe14f125c0}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!abortAllRequests@{abortAllRequests}}
\index{abortAllRequests@{abortAllRequests}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{abortAllRequests()}{abortAllRequests()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::abort\+All\+Requests (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Abort all previously issued requests. 

\mbox{\hyperlink{class_ogre_1_1_any}{Any}} requests still waiting to be processed will be removed from the queue. \mbox{\hyperlink{class_ogre_1_1_any}{Any}} requests that are being processed will still complete. 

Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a0c50d7ab19de75a3e378ba46aa8fbf9c}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a414eb873108df39549cc79d8246994d3}\label{class_ogre_1_1_work_queue_a414eb873108df39549cc79d8246994d3}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!setPaused@{setPaused}}
\index{setPaused@{setPaused}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{setPaused()}{setPaused()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::set\+Paused (\begin{DoxyParamCaption}\item[{bool}]{pause }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Set whether to pause further processing of any requests. 

If true, any further requests will simply be queued and not processed until set\+Paused(false) is called. \mbox{\hyperlink{class_ogre_1_1_any}{Any}} requests which are in the process of being worked on already will still continue. 

Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a7f471c07b8f0fdd002d6c299750a1578}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a79a71d8b70010d28043a2fef2c3e2cf8}\label{class_ogre_1_1_work_queue_a79a71d8b70010d28043a2fef2c3e2cf8}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!isPaused@{isPaused}}
\index{isPaused@{isPaused}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{isPaused()}{isPaused()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Work\+Queue\+::is\+Paused (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Return whether the queue is paused ie not sending more work to workers. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_aa8530de81120f7820964029b8de88972}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a1fd22283445612a4d0e020917f1582b9}\label{class_ogre_1_1_work_queue_a1fd22283445612a4d0e020917f1582b9}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!setRequestsAccepted@{setRequestsAccepted}}
\index{setRequestsAccepted@{setRequestsAccepted}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{setRequestsAccepted()}{setRequestsAccepted()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::set\+Requests\+Accepted (\begin{DoxyParamCaption}\item[{bool}]{accept }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Set whether to accept new requests or not. 

If true, requests are added to the queue as usual. If false, requests are silently ignored until set\+Requests\+Accepted(true) is called. 

Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a291e7c92efb374ec208c680375edd2ce}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_abc8685f2e0f4921468f8cf7cb5f2b2b3}\label{class_ogre_1_1_work_queue_abc8685f2e0f4921468f8cf7cb5f2b2b3}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!getRequestsAccepted@{getRequestsAccepted}}
\index{getRequestsAccepted@{getRequestsAccepted}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{getRequestsAccepted()}{getRequestsAccepted()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Work\+Queue\+::get\+Requests\+Accepted (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns whether requests are being accepted right now. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_ab49caa9d2a8b18cfb2e9beccd41bdd22}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_aa4c64bf597bd87860dc297f0ac7af463}\label{class_ogre_1_1_work_queue_aa4c64bf597bd87860dc297f0ac7af463}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!processResponses@{processResponses}}
\index{processResponses@{processResponses}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{processResponses()}{processResponses()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::process\+Responses (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Process the responses in the queue. 

\begin{DoxyRemark}{Remarks}
This method is public, and must be called from the main render thread to \textquotesingle{}pump\textquotesingle{} responses through the system. The method will usually try to clear all responses before returning = 0; however, you can specify a time limit on the response processing to limit the impact of spikes in demand by calling set\+Response\+Processing\+Time\+Limit. 
\end{DoxyRemark}


Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a09a2d91f22689b5aad7967cfb799c63e}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a9b605e17372e8a45eab9471955979d4a}\label{class_ogre_1_1_work_queue_a9b605e17372e8a45eab9471955979d4a}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!getResponseProcessingTimeLimit@{getResponseProcessingTimeLimit}}
\index{getResponseProcessingTimeLimit@{getResponseProcessingTimeLimit}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{getResponseProcessingTimeLimit()}{getResponseProcessingTimeLimit()}}
{\footnotesize\ttfamily virtual unsigned long Ogre\+::\+Work\+Queue\+::get\+Response\+Processing\+Time\+Limit (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Get the time limit imposed on the processing of responses in a single frame, in milliseconds (0 indicates no limit). 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a92bfbc2f99623e8df8dd2d611afda1ae}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a9b631e09dcaafb4a341eff307f00feca}\label{class_ogre_1_1_work_queue_a9b631e09dcaafb4a341eff307f00feca}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!setResponseProcessingTimeLimit@{setResponseProcessingTimeLimit}}
\index{setResponseProcessingTimeLimit@{setResponseProcessingTimeLimit}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{setResponseProcessingTimeLimit()}{setResponseProcessingTimeLimit()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::set\+Response\+Processing\+Time\+Limit (\begin{DoxyParamCaption}\item[{unsigned long}]{ms }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Set the time limit imposed on the processing of responses in a single frame, in milliseconds (0 indicates no limit). 

This sets the maximum time that will be spent in \mbox{\hyperlink{class_ogre_1_1_work_queue_aa4c64bf597bd87860dc297f0ac7af463}{process\+Responses()}} in a single frame. The default is 8ms. 

Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_base_a7b7a4119647b82187af2341d96f51e3b}{Ogre\+::\+Default\+Work\+Queue\+Base}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a42d64d8891849878e3d1afb66fa0ce19}\label{class_ogre_1_1_work_queue_a42d64d8891849878e3d1afb66fa0ce19}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!shutdown@{shutdown}}
\index{shutdown@{shutdown}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{shutdown()}{shutdown()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Work\+Queue\+::shutdown (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Shut down the queue. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_default_work_queue_a74aec1a66a9d5a5639a62ed33747eb76}{Ogre\+::\+Default\+Work\+Queue}}, and \mbox{\hyperlink{class_ogre_1_1_default_work_queue_a74aec1a66a9d5a5639a62ed33747eb76}{Ogre\+::\+Default\+Work\+Queue}}.

\mbox{\Hypertarget{class_ogre_1_1_work_queue_a9a550b2e870c3cf2fb7dc6732ceed3e5}\label{class_ogre_1_1_work_queue_a9a550b2e870c3cf2fb7dc6732ceed3e5}} 
\index{Ogre::WorkQueue@{Ogre::WorkQueue}!getChannel@{getChannel}}
\index{getChannel@{getChannel}!Ogre::WorkQueue@{Ogre::WorkQueue}}
\doxysubsubsection{\texorpdfstring{getChannel()}{getChannel()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} Ogre\+::\+Work\+Queue\+::get\+Channel (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{channel\+Name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Get a channel ID for a given channel name. 

\begin{DoxyRemark}{Remarks}
Channels are assigned on a first-\/come, first-\/served basis and are not persistent across application instances. This method allows applications to not worry about channel clashes through manually assigned channel numbers. 
\end{DoxyRemark}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_work_queue_8h}{Ogre\+Work\+Queue.\+h}}\end{DoxyCompactItemize}
