[cpp-threads] Thread API interface tweaks

Alexander Terekhov alexander.terekhov at gmail.com
Tue Aug 29 00:20:26 BST 2006


On 8/28/06, Peter Dimov <pdimov at mmltd.net> wrote:
[...]
> future<R> provides storage for the return value (or the exception). task<Fn,

Or cancel indication (if Fn can throw thread_cancel aka
thread_exit_request<thread_canceled>). A future should better know the
throw spec of Fn and ensure that only specified exceptions (if any;
implicit "..." by default for functions without throw specs aside for
a moment) are caught and transported across threads. Also, you better
turn thread_cancel raised (caught-and-finalized if Fn can throw it
according to throw spec) in the context of "future" invocation into
bool future's canceled() state.

regards,
alexander.



More information about the cpp-threads mailing list