Created on 2009-04-03.00:00:00 last changed 169 months ago
Proposed resolution:
Change [futures.shared_future]:
const R& shared_future::get() const; R& shared_future<R&>::get() const; void shared_future<void>::get() const;...
-9- Throws: the stored exception, if an exception was stored
and not retrieved before. [Note: Multiple calls on get() are allowed, and each call would result in an exception if an exception was stored. — end note]
Rationale:
Resolved by paper N2997.
[ 2010-01-23 Moved to Tentatively NAD Editorial after 5 positive votes on c++std-lib. ]
[ Batavia (2009-05): ]
We note there is a pending paper by Detlef on such future-related issues; we would like to wait for his paper before proceeding.
Alisdair suggests we may want language to clarify that this get() function can be called from several threads with no need for explicit locking.
Move to Open.
It is not clear, if multiple threads are waiting in a shared_future::get() call, if each will rethrow the stored exception.
Paragraph 9 reads:
Throws: the stored exception, if an exception was stored and not retrieved before.
The "not retrieved before" suggests that only one exception is thrown, but one exception for each call to get() is needed, and multiple calls to get() even on the same shared_future object seem to be allowed.
I suggest removing "and not retrieved before" from the Throws paragraph. I recommend adding a note that explains that multiple calls on get() are allowed, and each call would result in an exception if an exception was stored.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-12-05 14:14:49 | admin | set | status: nad editorial -> resolved |
2010-10-21 18:28:33 | admin | set | messages: + msg751 |
2010-10-21 18:28:33 | admin | set | messages: + msg750 |
2010-10-21 18:28:33 | admin | set | messages: + msg749 |
2010-10-21 18:28:33 | admin | set | messages: + msg748 |
2009-04-03 00:00:00 | admin | create |