|
Boost : |
Subject: Re: [boost] [transact] code in sandbox
From: strasser_at_[hidden]
Date: 2010-02-17 13:13:20
Zitat von Vicente Botet Escriba <vicente.botet_at_[hidden]>:
>
> abort/rollback will abort the current transaction on the point of call,
> force_to_abort/set_rollback_only don' make the transaction to abort/rollback
> immediately, but tell to the the transaction that it must be
> aborted/rolledback next time we try to commit it.
some more details:
1)
transaction tx;
tx.rollback_only();
tx.commit(); //does what? throw? which exception?
2)
transaction tx;
tx.rollback_only();
pers_obj->value=1; //does what?
//a) throw? which exception?
//b) go ahead, only throw on commit.
3)
transaction tx;
tx.rollback();
tx.commit(); //throw? which exception?
4)
transaction tx;
tx.rollback();
pers_obj->value=1; //throw? which exception?
please explain why for each case.
current behaviour is the following, but subject to change:
1/2: non-existent
3: undefined behaviour(my RM throws no_active_transaction)
4: throw no_active_transaction()
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk