Talk:cpp/thread/promise/get future
From cppreference.com
[edit] Unclear text
The text reads (highlights are mine):
Calls to this function do not introduce data races with calls to set_value, set_exception, set_value_at_thread_exit, or set_exception_at_thread_exit (but they need not synchronize with each other).
Shouldn't it be:
Calls to this function do not introduce data races with calls to set_value, set_exception, set_value_at_thread_exit, or set_exception_at_thread_exit (therefore they need not synchronize with each other).
- "therefore" is correct, IMO.)
- The draft says
The set_value, set_exception, set_value_at_thread_exit, and set_exception_at_thread_exit member functions behave as though they acquire a single mutex associated with the promise object while updating the promise object.
- and also
future<R> get_future(); Synchronization: Calls to this function do not introduce data races ([intro.multithread]) with calls to set_value, set_exception, set_value_at_thread_exit, or set_exception_at_thread_exit. [Note 1: Such calls need not synchronize with each other. — end note]
- --Space Mission (talk) 09:21, 26 August 2021 (PDT)