23 #ifndef _IGNITE_FUTURE
24 #define _IGNITE_FUTURE
26 #include <ignite/common/shared_state.h>
53 friend class common::Promise<T>;
89 const common::SharedState<ValueType>* state0 = state.Get();
105 const common::SharedState<ValueType>* state0 = state.Get();
109 return state0->WaitFor(msTimeout);
121 const common::SharedState<ValueType>* state0 = state.Get();
125 return state0->GetValue();
133 common::SharedState<ValueType>* state0 = state.Get();
145 common::SharedState<ValueType>* state0 = state.Get();
149 return state0->IsSet();
158 Future(common::concurrent::SharedPointer< common::SharedState<ValueType> > state0) :
165 common::concurrent::SharedPointer< common::SharedState<ValueType> > state;
174 friend class common::Promise<void>;
210 const common::SharedState<ValueType>* state0 = state.Get();
226 const common::SharedState<ValueType>* state0 = state.Get();
230 return state0->WaitFor(msTimeout);
241 const common::SharedState<ValueType>* state0 = state.Get();
253 common::SharedState<ValueType>* state0 = state.Get();
265 common::SharedState<ValueType>* state0 = state.Get();
269 return state0->IsSet();
278 Future(common::concurrent::SharedPointer< common::SharedState<ValueType> > state0) :
285 common::concurrent::SharedPointer< common::SharedState<ValueType> > state;
292 class Future< common::concurrent::SharedPointer<T> >
294 friend class common::Promise< common::concurrent::SharedPointer<T> >;
308 Future(const Future<SP_ValueType>& src) :
334 const common::SharedState<SP_ValueType>* state0 = state.Get();
350 const common::SharedState<SP_ValueType>* state0 = state.Get();
354 return state0->WaitFor(msTimeout);
366 const common::SharedState<SP_ValueType>* state0 = state.Get();
370 return state0->GetValue();
378 common::SharedState<SP_ValueType>* state0 = state.Get();
390 common::SharedState<SP_ValueType>* state0 = state.Get();
394 return state0->IsSet();
403 Future(common::concurrent::SharedPointer< common::SharedState<SP_ValueType> > state0) :
410 common::concurrent::SharedPointer< common::SharedState<SP_ValueType> > state;
414 #endif //_IGNITE_FUTURE