Now I don't quite understand. Setting the flag is quick, therefore many
activities can work in parallel on multiple objects between setting and
unsetting the flag. Only some activities will have to wait if they want to
access the object that is currently busy.
Or am I missing something here? If one activity is waiting for the busy one at
the "when" statement, does it affect another activity which is checking
different instance of the flag? If that other instance is not busy, can it
enter the "when" block?
________________________________
From: Saliya Ekanayake <esal...@gmail.com>
To: Mailing list for users of the X10 programming language
<x10-users@lists.sourceforge.net>
Sent: Friday, November 16, 2012 4:43 PM
Subject: Re: [X10-users] Atomic blocks
Yes I agree, that in the workaround I posted, setting the flag is still be
dependent on the single lock.
I wonder if there's some documentation to x10.util.concurrent package?
Thank you,
Saliya
On Fri, Nov 16, 2012 at 4:09 PM, Vijay Saraswat <vi...@saraswat.org> wrote:
On 11/16/12 3:58 PM, LEONID ILYEVSKY wrote:
>
>Saliya suggested to use boolean flag to guard the critical session, set it in
>the "when" block and unset it in "atomic". Looks like a solution virtually
>equivalent to java's synchronization. What do you think?
>>
>>
>>
>>
This wont give the performance you want because of the current
single-lock-per-place implementation (see Dave Cunningham's message).
>
>------------------------------------------------------------------------------
>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
------------------------------------------------------------------------------
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