\doxysection{\+\_\+\+Eina\+\_\+\+Future\+\_\+\+Race\+\_\+\+Result Struct Reference}
\hypertarget{struct__Eina__Future__Race__Result}{}\label{struct__Eina__Future__Race__Result}\index{\_Eina\_Future\_Race\_Result@{\_Eina\_Future\_Race\_Result}}


The struct that is used to store the race result.  




{\ttfamily \#include $<$eina\+\_\+promise.\+h$>$}

\doxysubsubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{struct__Eina__Future__Race__Result_a4e4c483399fffa7fdcb5d93b05092bb8}\label{struct__Eina__Future__Race__Result_a4e4c483399fffa7fdcb5d93b05092bb8} 
\mbox{\hyperlink{group__Eina__Value__Group_ga7985e8af6e956ae31b381bf829173cc0}{Eina\+\_\+\+Value}} {\bfseries value}
\begin{DoxyCompactList}\small\item\em The race result. \end{DoxyCompactList}\item 
\Hypertarget{struct__Eina__Future__Race__Result_a48e58e442e3cf78dbfe34170edf9cbe0}\label{struct__Eina__Future__Race__Result_a48e58e442e3cf78dbfe34170edf9cbe0} 
unsigned int {\bfseries index}
\begin{DoxyCompactList}\small\item\em The future index that won the race. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
The struct that is used to store the race result. 

When using \doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} and friends, the future result will be reported as a struct. The values can be obtained using eina\+\_\+value\+\_\+struct\+\_\+get() or one could access the struct directly such as this example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}}
\DoxyCodeLine{\_race\_cb(\textcolor{keyword}{const}\ \textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \textcolor{keyword}{const}\ \mbox{\hyperlink{struct__Eina__Value}{Eina\_Value}}\ v)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//code...}}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__Value__Struct}{Eina\_Value\_Struct}}\ st;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__Future__Race__Result}{Eina\_Future\_Race\_Result}}\ *rr;}
\DoxyCodeLine{\ \ \ eina\_value\_get(v,\ \&st);}
\DoxyCodeLine{\ \ \ rr\ =\ st.\mbox{\hyperlink{struct__Eina__Value__Struct_a9981fecb227d833bb860fa6d128ee66a}{memory}};}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Winning\ future\ index:\ \%u\(\backslash\)n"{}},\ rr-\/>index);}
\DoxyCodeLine{\ \ \ \textcolor{comment}{//more\ code..}}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ v;}
\DoxyCodeLine{\}}

\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\doxylink{group__Eina__Future_ga5f61d533ecab8275bb3329e8cc78424a}{eina\+\_\+promise\+\_\+race\+\_\+array()} 

\doxylink{group__Eina__Future_ga803faac8b5dc7a858da3e0112fd97d10}{eina\+\_\+future\+\_\+race\+\_\+array()} 

\doxylink{group__Eina__Future_gac0bf547a87e9bea1e589e8a6e13576e7}{eina\+\_\+promise\+\_\+race()} 

\doxylink{group__Eina__Future_ga6a39aa29dad9e9ba9038908758f20c32}{eina\+\_\+future\+\_\+race()} 

\doxylink{group__Eina__Future_ga8b2461685ba3e12305bd69730a83dbcb}{EINA\+\_\+\+PROMISE\+\_\+\+RACE\+\_\+\+STRUCT\+\_\+\+DESC} 
\end{DoxySeeAlso}
