\hypertarget{structefl_1_1eina_1_1condition__variable}{\section{efl\+:\+:eina\+:\+:condition\+\_\+variable Struct Reference}
\label{structefl_1_1eina_1_1condition__variable}\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
}


Provides an O\+O\+P interface to the {\ttfamily Eina\+\_\+\+Condition} and automatic resource allocation and deallocation using the R\+A\+I\+I programming idiom.  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
typedef Eina\+\_\+\+Condition $\ast$ \hyperlink{structefl_1_1eina_1_1condition__variable_a8b02d7a61f7034fd28f286827126bb65}{native\+\_\+handle\+\_\+type}
\begin{DoxyCompactList}\small\item\em Type for the native Eina\+\_\+\+Lock pointer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structefl_1_1eina_1_1condition__variable_aa177d95a9137959c165ef38c69fb6dec}{condition\+\_\+variable} ()
\begin{DoxyCompactList}\small\item\em Create a new condition variable. \end{DoxyCompactList}\item 
\hyperlink{structefl_1_1eina_1_1condition__variable_a46792adc70659fc7826bb2544598920f}{$\sim$condition\+\_\+variable} ()
\begin{DoxyCompactList}\small\item\em Release the condition variable resources. \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1eina_1_1condition__variable_a8669214bf32a9ed5dbbb2278a9f6bf68}{notify\+\_\+one} ()
\begin{DoxyCompactList}\small\item\em Unblock a thread waiting for this condition. \end{DoxyCompactList}\item 
void \hyperlink{structefl_1_1eina_1_1condition__variable_ac69b238bd9a767d7b71241d00afe8384}{notify\+\_\+all} ()
\begin{DoxyCompactList}\small\item\em Unblock all threads waiting for this condition. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Lock $>$ }\\void \hyperlink{structefl_1_1eina_1_1condition__variable_a2054c5a724b4faf9e68d8938146d2ef7}{wait} (Lock \&lock)
\begin{DoxyCompactList}\small\item\em Causes a thread to wait until notified. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename Lock , typename Predicate $>$ }\\void \hyperlink{structefl_1_1eina_1_1condition__variable_a88b27130226b19da9921ce6af79811c9}{wait} (Lock \&lock, Predicate p)
\begin{DoxyCompactList}\small\item\em Causes a thread to wait until notified. \end{DoxyCompactList}\item 
\hyperlink{structefl_1_1eina_1_1condition__variable_a8b02d7a61f7034fd28f286827126bb65}{native\+\_\+handle\+\_\+type} \hyperlink{structefl_1_1eina_1_1condition__variable_a73dfd8152533c301c3d07b4581161f3c}{native\+\_\+handle} ()
\begin{DoxyCompactList}\small\item\em Get a handle for the wrapped {\ttfamily Eina\+\_\+\+Condition}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provides an O\+O\+P interface to the {\ttfamily Eina\+\_\+\+Condition} and automatic resource allocation and deallocation using the R\+A\+I\+I programming idiom. 

This class implements condition variables in a way that strongly resembles the S\+T\+L {\ttfamily std\+::condition\+\_\+variable}. 

\subsection{Member Typedef Documentation}
\hypertarget{structefl_1_1eina_1_1condition__variable_a8b02d7a61f7034fd28f286827126bb65}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!native\+\_\+handle\+\_\+type@{native\+\_\+handle\+\_\+type}}
\index{native\+\_\+handle\+\_\+type@{native\+\_\+handle\+\_\+type}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{native\+\_\+handle\+\_\+type}]{\setlength{\rightskip}{0pt plus 5cm}typedef Eina\+\_\+\+Condition$\ast$ {\bf efl\+::eina\+::condition\+\_\+variable\+::native\+\_\+handle\+\_\+type}}}\label{structefl_1_1eina_1_1condition__variable_a8b02d7a61f7034fd28f286827126bb65}


Type for the native Eina\+\_\+\+Lock pointer. 



\subsection{Constructor \& Destructor Documentation}
\hypertarget{structefl_1_1eina_1_1condition__variable_aa177d95a9137959c165ef38c69fb6dec}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!condition\+\_\+variable@{condition\+\_\+variable}}
\index{condition\+\_\+variable@{condition\+\_\+variable}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{condition\+\_\+variable}]{\setlength{\rightskip}{0pt plus 5cm}efl\+::eina\+::condition\+\_\+variable\+::condition\+\_\+variable (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_aa177d95a9137959c165ef38c69fb6dec}


Create a new condition variable. 

Automatically allocates a new condition variable and does any platform dependent initialization that is required. 

References eina\+\_\+condition\+\_\+new(), and efl\+::eina\+::mutex\+::native\+\_\+handle().

\hypertarget{structefl_1_1eina_1_1condition__variable_a46792adc70659fc7826bb2544598920f}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!````~condition\+\_\+variable@{$\sim$condition\+\_\+variable}}
\index{````~condition\+\_\+variable@{$\sim$condition\+\_\+variable}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{$\sim$condition\+\_\+variable}]{\setlength{\rightskip}{0pt plus 5cm}efl\+::eina\+::condition\+\_\+variable\+::$\sim$condition\+\_\+variable (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_a46792adc70659fc7826bb2544598920f}


Release the condition variable resources. 

Automatically deallocates the condition variable and does any platform dependent cleanup that is required. 

References eina\+\_\+condition\+\_\+free().



\subsection{Member Function Documentation}
\hypertarget{structefl_1_1eina_1_1condition__variable_a8669214bf32a9ed5dbbb2278a9f6bf68}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!notify\+\_\+one@{notify\+\_\+one}}
\index{notify\+\_\+one@{notify\+\_\+one}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{notify\+\_\+one}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::eina\+::condition\+\_\+variable\+::notify\+\_\+one (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_a8669214bf32a9ed5dbbb2278a9f6bf68}


Unblock a thread waiting for this condition. 


\begin{DoxyExceptions}{Exceptions}
{\em $<$tt$>$eina\+::system\+\_\+error$<$/tt$>$} & on fail.\\
\hline
\end{DoxyExceptions}
This member function unblock a thread waiting on this condition variable. If there is more than one thread waiting on this condition, one of them will be unblocked, but which one is undefined. If you do not know for sure that there is only one thread waiting, use \hyperlink{structefl_1_1eina_1_1condition__variable_ac69b238bd9a767d7b71241d00afe8384}{notify\+\_\+all()} instead. 

References eina\+\_\+condition\+\_\+signal(), and efl\+::eina\+::get\+\_\+error\+\_\+code().

\hypertarget{structefl_1_1eina_1_1condition__variable_ac69b238bd9a767d7b71241d00afe8384}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!notify\+\_\+all@{notify\+\_\+all}}
\index{notify\+\_\+all@{notify\+\_\+all}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{notify\+\_\+all}]{\setlength{\rightskip}{0pt plus 5cm}void efl\+::eina\+::condition\+\_\+variable\+::notify\+\_\+all (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_ac69b238bd9a767d7b71241d00afe8384}


Unblock all threads waiting for this condition. 


\begin{DoxyExceptions}{Exceptions}
{\em $<$tt$>$eina\+::system\+\_\+error$<$/tt$>$} & on fail.\\
\hline
\end{DoxyExceptions}
This member function unblocks all the threads waiting on the this condition. If you know for sure that there is only one thread waiting, use \hyperlink{structefl_1_1eina_1_1condition__variable_a8669214bf32a9ed5dbbb2278a9f6bf68}{notify\+\_\+one} instead to gain a little optimization. 

References eina\+\_\+condition\+\_\+broadcast(), and efl\+::eina\+::get\+\_\+error\+\_\+code().

\hypertarget{structefl_1_1eina_1_1condition__variable_a2054c5a724b4faf9e68d8938146d2ef7}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!wait@{wait}}
\index{wait@{wait}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Lock $>$ void efl\+::eina\+::condition\+\_\+variable\+::wait (
\begin{DoxyParamCaption}
\item[{Lock \&}]{lock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_a2054c5a724b4faf9e68d8938146d2ef7}


Causes a thread to wait until notified. 


\begin{DoxyParams}{Parameters}
{\em lock} & A lockable object ({\ttfamily mutex}, {\ttfamily unique\+\_\+lock}, etc) that is currently locked by this thread. All concurrent calls to wait member functions of this object shall use the same lockable object.\\
\hline
\end{DoxyParams}
This member function makes a thread block until notified. 

References eina\+\_\+condition\+\_\+wait().



Referenced by wait().

\hypertarget{structefl_1_1eina_1_1condition__variable_a88b27130226b19da9921ce6af79811c9}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!wait@{wait}}
\index{wait@{wait}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{wait}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Lock , typename Predicate $>$ void efl\+::eina\+::condition\+\_\+variable\+::wait (
\begin{DoxyParamCaption}
\item[{Lock \&}]{lock, }
\item[{Predicate}]{p}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_a88b27130226b19da9921ce6af79811c9}


Causes a thread to wait until notified. 


\begin{DoxyParams}{Parameters}
{\em lock} & A lockable object ({\ttfamily mutex}, {\ttfamily unique\+\_\+lock}, etc) that is currently locked by this thread. All concurrent calls to wait member functions of this object shall use the same lockable object. \\
\hline
{\em p} & A callable object or function that takes no arguments and returns a value that can be evaluated as a bool. This is called repeatedly until it evaluates to true.\\
\hline
\end{DoxyParams}
This member function only blocks the thread if {\ttfamily p} is evaluated to {\ttfamily false}. In this case the thread remains blocked until notified and the result of {\ttfamily p} evaluates to {\ttfamily true}. 

References wait().

\hypertarget{structefl_1_1eina_1_1condition__variable_a73dfd8152533c301c3d07b4581161f3c}{\index{efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}!native\+\_\+handle@{native\+\_\+handle}}
\index{native\+\_\+handle@{native\+\_\+handle}!efl\+::eina\+::condition\+\_\+variable@{efl\+::eina\+::condition\+\_\+variable}}
\subsubsection[{native\+\_\+handle}]{\setlength{\rightskip}{0pt plus 5cm}{\bf native\+\_\+handle\+\_\+type} efl\+::eina\+::condition\+\_\+variable\+::native\+\_\+handle (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{structefl_1_1eina_1_1condition__variable_a73dfd8152533c301c3d07b4581161f3c}


Get a handle for the wrapped {\ttfamily Eina\+\_\+\+Condition}. 

\begin{DoxyReturn}{Returns}
Handle for the native {\ttfamily Eina\+\_\+\+Condition}.
\end{DoxyReturn}
This member function returns the native {\ttfamily Eina\+\_\+\+Condition} handle that is wrapped inside this object.

\begin{DoxyWarning}{Warning}
It is important to take care when using it, since the handle will be automatically released upon object destruction. 
\end{DoxyWarning}
