curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: Usage of SharedCount
Date Mon, 16 Dec 2013 01:26:19 GMT
Like most objects in Curator, you allocate the instance, use it as long as you need and the
close it when you no longer need the object. I’m not sure how to make it more clear.

-Jordan

On Dec 15, 2013, at 6:47 PM, Sznajder ForMailingList <bs4mailinglist@gmail.com> wrote:

> Just to be sure:
> 
> my scenario is that several processes increment and decrement this node value.
> Each process calls "close()" only at the end of its processing or for each incrementation
/ decrementation ?
> 
> Benjamin
> 
> 
> On Mon, Dec 16, 2013 at 1:45 AM, Sznajder ForMailingList <bs4mailinglist@gmail.com>
wrote:
> Thanks, Jordan for your answer!!
> 
> Will the other processes see the updated value under this node, if I did not call close()
yet?
> 
> Benjamin
> 
> 
> On Mon, Dec 16, 2013 at 12:36 AM, Jordan Zimmerman <jordan@jordanzimmerman.com>
wrote:
> Call close() when you are done with the object. i.e. allocate once, close once. Think
of a file handle, etc.
> 
> On Dec 15, 2013, at 4:19 PM, Sznajder ForMailingList <bs4mailinglist@gmail.com>
wrote:
> 
> > Hi
> >
> > When I am using SharedCount for counting, should I call SharedCount.close() every
time, I changed the value of the SharedCount?
> > Or, this close() must be called only, at the end of the process?
> >
> > Many thanks!
> >
> > Benjamin
> 
> 
> 


Mime
View raw message