Re: Discarding entire transactions

2009-02-09 Thread Anand Patil
On Feb 8, 9:03 pm, Dan wrote: > > (def a (ref 1)) > > (def b (ref 1)) > > > ; Do these concurrently, either from separate agents or using pmap > > (dosync (commute b error-throwing-fn a)) > > (dosync (commute a + @b)) > > > I want to have the option to abort the first transaction without > > roll

Re: Discarding entire transactions

2009-02-08 Thread Dan
On Sun, Feb 8, 2009 at 12:23 PM, Anand Patil < anand.prabhakar.pa...@gmail.com> wrote: > > Hello again, > > In my application, I'll frequently want to quickly discard all the > changes made during a transaction involving many refs. I don't want to > force the refs to roll back to their values at t

Re: Discarding entire transactions

2009-02-08 Thread Dan
> > (def a (ref 1)) > (def b (ref 1)) > > ; Do these concurrently, either from separate agents or using pmap > (dosync (commute b error-throwing-fn a)) > (dosync (commute a + @b)) > > I want to have the option to abort the first transaction without > rolling back the second. Based on what you said,

Re: Discarding entire transactions

2009-02-08 Thread Anand Patil
On Feb 8, 7:29 pm, Shawn Hoover wrote: > On Sun, Feb 8, 2009 at 12:23 PM, Anand Patil < > > anand.prabhakar.pa...@gmail.com> wrote: > > > Hello again, > > > In my application, I'll frequently want to quickly discard all the > > changes made during a transaction involving many refs. I don't want t

Re: Discarding entire transactions

2009-02-08 Thread Shawn Hoover
On Sun, Feb 8, 2009 at 12:23 PM, Anand Patil < anand.prabhakar.pa...@gmail.com> wrote: > > Hello again, > > In my application, I'll frequently want to quickly discard all the > changes made during a transaction involving many refs. I don't want to > force the refs to roll back to their values at t

Re: Discarding entire transactions

2009-02-08 Thread Jeffrey Straszheim
I don't think you can. There is no "rollback" function available. On Sun, Feb 8, 2009 at 12:23 PM, Anand Patil < anand.prabhakar.pa...@gmail.com> wrote: > > Hello again, > > In my application, I'll frequently want to quickly discard all the > changes made during a transaction involving many refs