basic Multiverse questions

9 views
Skip to first unread message

Mark Volkmann

unread,
Aug 25, 2009, 3:24:22 PM8/25/09
to multiverse
Can objects from a class that has been annotated with @AtomicObject be
modified outside a transaction?

Are conflicts between transactions only detected during a commit? In
other words, do methods that have been annotated with @AtomicMethod
always run to completion before conflicts are detected?

Peter Veentjer

unread,
Aug 25, 2009, 5:32:03 PM8/25/09
to googlemu...@googlegroups.com
Hi Mark,

thanks for posting your questions

On Tue, Aug 25, 2009 at 9:24 PM, Mark Volkmann<r.mark....@gmail.com> wrote:
>
> Can objects from a class that has been annotated with @AtomicObject be
> modified outside a transaction?

It can't happen because all methods of atomicobjects are atomic by default.

In the future propagation support will be added.

All (mutable) state is removed from the atomic object, and moved to
the transaction local version
(I call this the tranlocal). And it is "impossible" to access the
tranlocal without a transaction.

>
> Are conflicts between transactions only detected during a commit?

Atm yes.

In the future pessimistic locking will be added to prevent conflicts,
and if needed
a 'validate' method on the transaction can be added to see if the
transaction has
any chance of succeeding. Perhaps this functionality could also be triggered
when a method on the transaction is called (for example the load). Such a method
could act like a tripwire just like the interrupt status on a thread
that causes a
interruptedexception to be thrown when a blocking method is started.

> other words, do methods that have been annotated with @AtomicMethod
> always run to completion before conflicts are detected?

Yes.. for now... but if it is really needed, it could be added.

> >
>

Peter Veentjer

unread,
Aug 25, 2009, 5:43:17 PM8/25/09
to googlemu...@googlegroups.com
I see that you are going to give a presentation about clojure and stm, cool :)

http://thestrangeloop.com/blog/09/08/07/speaker-focus-mark-volkmann-software-transactional-memory

I don't know much about the specifics of clojure its stm
implementation, but if you need
more detailed information about multiverse, I would be happy to answer
your questions.
Reply all
Reply to author
Forward
0 new messages