\hypertarget{class_s_c_i_run_1_1_condition_variable}{\section{Condition\-Variable Class Reference}
\label{class_s_c_i_run_1_1_condition_variable}\index{Condition\-Variable@{Condition\-Variable}}
}


{\ttfamily \#include $<$Condition\-Variable.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_s_c_i_run_1_1_condition_variable_aac04446dd96ab05939579fb503ff7129}{Condition\-Variable} (const char $\ast$\hyperlink{_boost_graph_example_tests_8cc_a8ad72759d07f18eaf8f6690e5dfb747c}{name})
\item 
\hyperlink{class_s_c_i_run_1_1_condition_variable_a06c2fc08612a8d85989d3538f6d5ac8f}{$\sim$\-Condition\-Variable} ()
\begin{DoxyCompactList}\small\item\em Destroy the condition variable. \end{DoxyCompactList}\item 
void \hyperlink{class_s_c_i_run_1_1_condition_variable_af9c4b7a84ca54caf1f66050acf51bde9}{wait} (\hyperlink{class_s_c_i_run_1_1_mutex}{Mutex} \&m)
\item 
void \hyperlink{class_s_c_i_run_1_1_condition_variable_a9df06f8dbaf153b1f6b05ef139d1c91c}{wait} (\hyperlink{class_s_c_i_run_1_1_recursive_mutex}{Recursive\-Mutex} \&m)
\item 
bool \hyperlink{class_s_c_i_run_1_1_condition_variable_af4fdb36747d1dae48bb7965175b02399}{timed\-Wait} (\hyperlink{class_s_c_i_run_1_1_mutex}{Mutex} \&m, const struct\-::timespec $\ast$abstime)
\item 
bool \hyperlink{class_s_c_i_run_1_1_condition_variable_aa7cddd00ade8c3c56f72eee11a6d4012}{timed\-Wait} (\hyperlink{class_s_c_i_run_1_1_recursive_mutex}{Recursive\-Mutex} \&m, const struct\-::timespec $\ast$abstime)
\item 
void \hyperlink{class_s_c_i_run_1_1_condition_variable_af3273d1b749941a04145e29ba4441500}{condition\-Signal} ()
\item 
void \hyperlink{class_s_c_i_run_1_1_condition_variable_ae39994b001b63abaca95661efe54f2f2}{condition\-Broadcast} ()
\end{DoxyCompactItemize}


\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_s_c_i_run_1_1_condition_variable_aac04446dd96ab05939579fb503ff7129}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!Condition\-Variable@{Condition\-Variable}}
\index{Condition\-Variable@{Condition\-Variable}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{Condition\-Variable}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Condition\-Variable} (
\begin{DoxyParamCaption}
\item[{const char $\ast$}]{name}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_aac04446dd96ab05939579fb503ff7129}
Create a condition variable. {\itshape name} should be a static string which describes the primitive for debugging purposes. \hypertarget{class_s_c_i_run_1_1_condition_variable_a06c2fc08612a8d85989d3538f6d5ac8f}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!$\sim$\-Condition\-Variable@{$\sim$\-Condition\-Variable}}
\index{$\sim$\-Condition\-Variable@{$\sim$\-Condition\-Variable}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{$\sim$\-Condition\-Variable}]{\setlength{\rightskip}{0pt plus 5cm}$\sim${\bf Condition\-Variable} (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_a06c2fc08612a8d85989d3538f6d5ac8f}


Destroy the condition variable. 



\subsection{Member Function Documentation}
\hypertarget{class_s_c_i_run_1_1_condition_variable_ae39994b001b63abaca95661efe54f2f2}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!condition\-Broadcast@{condition\-Broadcast}}
\index{condition\-Broadcast@{condition\-Broadcast}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{condition\-Broadcast}]{\setlength{\rightskip}{0pt plus 5cm}void condition\-Broadcast (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_ae39994b001b63abaca95661efe54f2f2}
Signal a condition. This will unblock all of the waiting threads. Note that only the number of waiting threads will be unblocked. No guarantee is made that these are the same N threads that were blocked at the time of the broadcast. \hypertarget{class_s_c_i_run_1_1_condition_variable_af3273d1b749941a04145e29ba4441500}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!condition\-Signal@{condition\-Signal}}
\index{condition\-Signal@{condition\-Signal}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{condition\-Signal}]{\setlength{\rightskip}{0pt plus 5cm}void condition\-Signal (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_af3273d1b749941a04145e29ba4441500}
Signal a condition. This will unblock one of the waiting threads. No guarantee is made as to which thread will be unblocked, but thread implementations typically give preference to the thread that has waited the longest. \hypertarget{class_s_c_i_run_1_1_condition_variable_af4fdb36747d1dae48bb7965175b02399}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!timed\-Wait@{timed\-Wait}}
\index{timed\-Wait@{timed\-Wait}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{timed\-Wait}]{\setlength{\rightskip}{0pt plus 5cm}bool timed\-Wait (
\begin{DoxyParamCaption}
\item[{{\bf Mutex} \&}]{m, }
\item[{const struct\-::timespec $\ast$}]{abstime}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_af4fdb36747d1dae48bb7965175b02399}
Wait for a condition. This method atomically unlocks {\bfseries mutex}, and blocks. The {\bfseries mutex} is typically used to guard access to the resource that the thread is waiting for. If the time abstime is reached before the \hyperlink{class_s_c_i_run_1_1_condition_variable}{Condition\-Variable} is signaled, this will return false. Otherewise it will return true. \hypertarget{class_s_c_i_run_1_1_condition_variable_aa7cddd00ade8c3c56f72eee11a6d4012}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!timed\-Wait@{timed\-Wait}}
\index{timed\-Wait@{timed\-Wait}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{timed\-Wait}]{\setlength{\rightskip}{0pt plus 5cm}bool timed\-Wait (
\begin{DoxyParamCaption}
\item[{{\bf Recursive\-Mutex} \&}]{m, }
\item[{const struct\-::timespec $\ast$}]{abstime}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_aa7cddd00ade8c3c56f72eee11a6d4012}
\hypertarget{class_s_c_i_run_1_1_condition_variable_af9c4b7a84ca54caf1f66050acf51bde9}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!wait@{wait}}
\index{wait@{wait}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}void wait (
\begin{DoxyParamCaption}
\item[{{\bf Mutex} \&}]{m}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_af9c4b7a84ca54caf1f66050acf51bde9}
Wait for a condition. This method atomically unlocks {\bfseries mutex}, and blocks. The {\bfseries mutex} is typically used to guard access to the resource that the thread is waiting for. \hypertarget{class_s_c_i_run_1_1_condition_variable_a9df06f8dbaf153b1f6b05ef139d1c91c}{\index{S\-C\-I\-Run\-::\-Condition\-Variable@{S\-C\-I\-Run\-::\-Condition\-Variable}!wait@{wait}}
\index{wait@{wait}!SCIRun::ConditionVariable@{S\-C\-I\-Run\-::\-Condition\-Variable}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}void wait (
\begin{DoxyParamCaption}
\item[{{\bf Recursive\-Mutex} \&}]{m}
\end{DoxyParamCaption}
)}}\label{class_s_c_i_run_1_1_condition_variable_a9df06f8dbaf153b1f6b05ef139d1c91c}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Core/\-Thread/\-Legacy/\hyperlink{_legacy_2_condition_variable_8h}{Condition\-Variable.\-h}\item 
Core/\-Thread/\-Legacy/\hyperlink{_thread__none_8cc}{Thread\-\_\-none.\-cc}\item 
Core/\-Thread/\-Legacy/\hyperlink{_thread__pthreads_8cc}{Thread\-\_\-pthreads.\-cc}\end{DoxyCompactItemize}
