develooper Front page | perl.perl6.language | Postings from July 2005

Re: Database Transactions and STM [was: Re: STM semantics, the Transactional role]

Thread Previous
From:
Aankhen
Date:
July 18, 2005 01:08
Subject:
Re: Database Transactions and STM [was: Re: STM semantics, the Transactional role]
Message ID:
ae697d050507180108175043b4@mail.gmail.com
On 7/18/05, Sam Vilain <sam@vilain.net> wrote:
> Is this needed, when you can just;
> 
>    atomic {
>       unsafeIO { $dbh.begin_work };
> 
>       unsafeIO { $dbh.do(...) };
> 
>       unsafeIO { $dbh.commit };
>    } CATCH {
>       $dbh.rollback;
>    };

Shouldn't that `CATCH` block be within the `atomic` block?  Or did I
miss something?

Aankhen

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About