|
Boost : |
From: Mitch Adler (Mitch_at_[hidden])
Date: 2002-08-13 19:45:25
Eric wrote:
>[Un?]fortunatly, as far as I know, the end user is required to specifiy the
>exceptions they would like propagated.
As I've been educated on a private thread, it's true that any exceptions
not known to propogate through this interface (thread creator not
specifying them, possibly implicity via function traits (?)) that also do
not inherit from a particular exception class (ThreadException?) won't
get caught, and will fall into the 'what do we do about terminate?' case.
Simply, the answer to:
>What mechanisms does boost.threads rely on/require such that this works
>portably?
Is: copyability and inhertance-from or wrapping-by by a rethrowing
object. The automatic wrapping happens based on a statically known list
of exceptions, usually acquired through a static template list (gotten
from function traits?).
If you inherit from the class, all is well. The wrappers seem good,
though that does leave the static nature of the list of exceptions to
pass across, and the question of termination still looms.
It might be interesting to define an exception class from which any
exception that wants to cross the barrier can inherit and have that
functionality guaranteed by boost.thread, and then make a utility
subclass of thread for the remote-call functionality (simliar to what has
been proposed here before).
Mitch
-- Mitch Adler "Truth never damages Apple Computer, Inc. a cause that is just." Mitch_at_[hidden] - Mahatma Gandhi MAdler_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk