async – state
_Call_immediate in Task
_Get_Value (wait for end-of-task)
_Get_Value (wait for running)
value holder with lock & notify
not copyable, assignable but movable
2 layer → _Promise – promise
_Promise for generic, promise for template specialization
get state or future using _State_manager
promise is valid && it not ready
but call ~promise
non copyable, assignable but movable
asynchronous return object that holds a value :?
is valid? by _Get_only_once
get, get, … and get
block until ready (result or exception)
copyable, assignable, movable
but get only once!
: public _State_manager
promise – future
valid – already set?
return the result of a call to a function object
return future (_Get_state_for_future)
separate run thread, result gather thread