8. promise
traits
not copyable, assignable but movable
2 layer → _Promise – promise
_Promise for generic, promise for template specialization
_Promise?
get state or future using _State_manager
broken_promise?
promise is valid && it not ready
but call ~promise
9. future
traits
non copyable, assignable but movable
asynchronous return object that holds a value :?
get
is valid? by _Get_only_once
get, get, … and get
block until ready (result or exception)
shared_future
copyable, assignable, movable
but get only once!
: public _State_manager
11. packaged_task
traits
asynchronous provider
return the result of a call to a function object
members
_Promise
get_future
return future (_Get_state_for_future)
operator()
_Call_immediate
why?
separate run thread, result gather thread
14. wait!
for
wait_for duration
until
wait_until time point
listing
sleep, wait, try_lock, …
15. chrono
brief
duration
time value with measurement unit
time point
since a specific point in time epoch
keywords
steady clock
can be adjusted
16. message passing
send signal inter-actor
manager programmercustomer
Request a product
Send functional list