Hi Leonid,

In your java version, are the threads accessing a separate copy of your
object? If so it seems like it should work even without being a
synchronized method. Also, if you create multiple objects and access them
from separate activities in X10 they should not block and atomic may not
make any difference as I understand.

In fact, atomic usage is beneficial only when you have a critical section
that at a given time only one activity is allowed to be in (per place).

Hope this helps.

Thank you,
Saliya


On Fri, Nov 16, 2012 at 10:28 AM, LEONID ILYEVSKY
<leonidilyev...@yahoo.com>wrote:

> Hi,
>
> I am new to X10, and I have a question about the atomic construct, maybe
> somebody can clarify it for me.
>
> Let say, in Java I have a class with some synchronized (on the object
> level) methods. If I have 100 such objects in memory, then 100 threads can
> simultaneously work on those objects without blocking each other.
> How you do the same thing in X10 (asuming the program is running in one
> place)? From the definition of the atomic block, it seems that if I
> translate Java syncronized methods to X10 atomic methods, then only one
> object at a time can be processed. Is my understanding correct?
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
>
>


-- 
Saliya Ekanayake
http://www.esaliya.blogspot.com
http://www.esaliya.wordpress.com
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to