Am 26.02.2016 um 10:44 schrieb Vijay Saraswat:
> Andreas -- as you know the issue is complex. Do you have a specific
> proposal to make for X10?

The C++ volatile does not make much sense for X10. It is used to write
device drivers or embedded stuff. Is anybody using X10 like this? For
concurrency it is quite useless, because it only constraints the
compiler, but not the hardware.

The Java volatile also seems unnecessary to me. Java uses it for things
like non-blocking synchronization, but AtomicReference [0] also provides
this (and more). A valid reason could be "convenience", but not a strong
reason in my opinion. Removing @Volatile completely means, for example,
that the code in XTENLANG-1808 [1] should use AtomicInteger instead.
That seems reasonable.

The complex issue is performance. AtomicInteger is a (final) class. I'm
not sure if the compiler always succeeds to remove all indirections and
really convert "flag.set(1)" into a direct "lock mov 1". It should.

[0]
https://stackoverflow.com/questions/281132/java-volatile-reference-vs-atomicreference
[1] https://xtenlang.atlassian.net/browse/XTENLANG-1808
-- 
Andreas Zwinkau

 KIT  IPD Snelting
 Web: http://pp.ipd.kit.edu/personhp/andreas_zwinkau.php

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to