Boost logo

Boost :

Subject: Re: [boost] [transact] code in sandbox
From: strasser_at_[hidden]
Date: 2010-02-12 10:18:14


Zitat von Vicente Botet Escriba <vicente.botet_at_[hidden]>:
>>
>> do{
>> return 1;
>> }while(a++ == 5);
>>
>> you don't expect that the side effects of the while-clause still takes
>> effect. so I don't see a problem in the behaviour that "return" omits
>> the commit either.
>> you could of course offer a macro like COMMIT_AND_RETURN.
>
> How the user can return successfully with your macros?

you can't, the macros are supposed to be a simplified syntax for the
most common use case, not replace using the 'transaction' class
directly.

if you want to provide a macro syntax that covers every use case you
can think of I'm ok with that(although I'd still prefer using
'transaction' directly in those cases).
just try not to confuse users who only want a simple syntax with stuff
like (_), having to understand implementation details or having to
choose from multiple macros based on where they are used (nested or
not).

I guess the only way to achieve that is 2 seperate sets of macros.

let me know what kind of support from RMs/TMs/transactions you need
for these macros.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk