|
Boost : |
Subject: Re: [boost] [transact] code in sandbox
From: strasser_at_[hidden]
Date: 2010-02-17 05:33:07
have you come to a conclusion on the issue below?
if you absolutely need this I'll implement it, probably as an optional
Service a RM can provide, and when it doesn't the TM reconstructs the
transaction on restart().
I'd still prefer not to though, as it complicates the TM and don't
think there is much logic behind "restarting" a transaction.
except reusing the resources occupied by it, but maybe that can be
achieved in other ways internally by the RM.
Zitat von strasser_at_[hidden]:
>> void restart();
>
> we've discussed this shortly before, making RMs support restarting
> transactions is not trivial. it would mean that
>
> unspecified begin_root_transaction();
>
> is changed to
>
> void begin_root_transaction(transaction &);
>
> and "transaction" must be DefaultConstructible.
>
> and every RM must support cleaning up a "transaction" object,
> possibly using a pointer to an internal transaction object or using
> boost::optional's internally to be able to re-construct it, if not
> all objects that are internally used can be cleared.
>
> do you really think this is worth having the small performance gain
> you talked about, ONLY in the case of an isolation_exception?
>
> if you need this for the purpose of the macro syntax only, you could
> wrap basic_transaction in a simple class like this:
>
> struct restartable_transaction{
> void restart(){ tx=in_place(); }
> optional<basic_transaction> tx;
> };
>
> I'd really like to keep this out of the RM requirements.
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk