Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 735

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

\section{ost::Runlist Class Reference}
\label{classost_1_1_runlist}\index{ost::Runlist@{ost::Runlist}}
A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore.list of runable objects.  


{\tt \#include $<$misc.h$>$}

Inheritance diagram for ost::Runlist::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classost_1_1_runlist}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Runlist} (unsigned count=1)
\begin{CompactList}\small\item\em Create a new runlist with a specified limit. \item\end{CompactList}\item 
bool {\bf add} ({\bf Runable} $\ast$run)
\begin{CompactList}\small\item\em Add a runable object to this runlist. \item\end{CompactList}\item 
void {\bf del} ({\bf Runable} $\ast$run)
\begin{CompactList}\small\item\em Remove a runable object from the wait list or notify when it is done running so that the used count can be decremented. \item\end{CompactList}\item 
void {\bf set} (unsigned {\bf limit})
\begin{CompactList}\small\item\em Set the limit. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf check} (void)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
unsigned {\bf limit}
\item 
unsigned {\bf used}
\end{CompactItemize}


\subsection{Detailed Description}
A runlist is used to restrict concurrent exection to a limited set of concurrent sessions, much like a semaphore.list of runable objects. 

However, the runlist differs in that it notifies objects when they become ready to run, rather than requiring them to wait and \char`\"{}block\char`\"{} for the semaphore count to become low enough to continue.

\begin{Desc}
\item[Author:]David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc}




\subsection{Constructor \& Destructor Documentation}
\index{ost::Runlist@{ost::Runlist}!Runlist@{Runlist}}
\index{Runlist@{Runlist}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Runlist::Runlist (unsigned {\em count} = {\tt 1})}\label{classost_1_1_runlist_cf40da12ac37924ec6b87d69506e4b93}


Create a new runlist with a specified limit. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em count}]limit before wait queuing. \end{description}
\end{Desc}


\subsection{Member Function Documentation}
\index{ost::Runlist@{ost::Runlist}!add@{add}}
\index{add@{add}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Runlist::add ({\bf Runable} $\ast$ {\em run})}\label{classost_1_1_runlist_8fcab00665f5e090c65cc13e3a69d8ac}


Add a runable object to this runlist. 

If the number of entries running is below the limit, then add returns true otherwise the entry is added to the list.

\begin{Desc}
\item[Returns:]true if immediately ready to run \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em run}]pointer to runable object. \end{description}
\end{Desc}
\index{ost::Runlist@{ost::Runlist}!check@{check}}
\index{check@{check}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Runlist::check (void)\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_runlist_5181bd617f64b050cefe1add4f26b05b}


\index{ost::Runlist@{ost::Runlist}!del@{del}}
\index{del@{del}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Runlist::del ({\bf Runable} $\ast$ {\em run})}\label{classost_1_1_runlist_96632ce03ef17c8e50a646522cfbd398}


Remove a runable object from the wait list or notify when it is done running so that the used count can be decremented. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em run}]pointer to runable object. \end{description}
\end{Desc}
\index{ost::Runlist@{ost::Runlist}!set@{set}}
\index{set@{set}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Runlist::set (unsigned {\em limit})}\label{classost_1_1_runlist_6dbfc8c0d5adbed629cfcda1470b937e}


Set the limit. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em limit}]to use. \end{description}
\end{Desc}


\subsection{Member Data Documentation}
\index{ost::Runlist@{ost::Runlist}!limit@{limit}}
\index{limit@{limit}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned {\bf ost::Runlist::limit}\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_runlist_df815575e69d1380df34a22d1b76b589}


\index{ost::Runlist@{ost::Runlist}!used@{used}}
\index{used@{used}!ost::Runlist@{ost::Runlist}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned {\bf ost::Runlist::used}\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_runlist_6b6d76330d6816dae8fd59fa2ddc80e0}




The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf misc.h}\end{CompactItemize}