![]() If this was the last such reference, the shared state is destroyed. release: the promise gives up its reference to the shared state.Marks the state ready and unblocks any thread waiting on a future associated with the shared state. make ready: the promise stores the result or the exception in the shared state.A promise may do three things with the shared state: Note that the std::promise object is meant to be used only once.Įach promise is associated with a shared state, which contains some state information and a result which may be not yet evaluated, evaluated to a value (possibly void) or evaluated to an exception. ![]() ![]() ![]() The class template std::promise provides a facility to store a value or an exception that is later acquired asynchronously via a std::future object created by the std::promise object. 3) void specialization, used to communicate stateless events ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |