[concurrency-interest] Transactional memory on GCC 4.7.0, what about Java?

Andrew Haley aph at redhat.com
Thu Nov 24 06:10:38 EST 2011


On 11/23/2011 07:36 PM, Dan Berindei wrote:
> What happens when I add a logger.debug("bla") statement at the
> beginning of a transaction?

That depends on your transactional model.  If you use the C++ model
you'll get a relaxed transaction, and everything will work as you
expect.

> Is that easier to explain then what happens when I add a
> logger.debug("bla") statement in a synchronized block?

I think so.  But it's much better to educate people to keep
their atomic blocks short.

Andrew.


More information about the Concurrency-interest mailing list