> > Sent: Wednesday, February 05, 2003 4:05 AM
> > Subject: RE: singleton creation (ot)
>
>
> > I'm not sure yet of how I will do it... I would not like to
> > synchronize the entire method because it'll probably be called million
> > of times
> From: "Felipe Schnack" <[EMAIL PROTECTED]>
> Sent: Wednesday, February 05, 2003 4:05 AM
> Subject: RE: singleton creation (ot)
> I'm not sure yet of how I will do it... I would not like to
> synchronize the entire method because it'll probably be
ts that the
> FS> semantics
> >> of volatile have been changed to make double-checked locking work.
> >>
> >> I'd love to hear different, or if anyone is aware of anything upcoming
> FS> to
> >> make the issue more obvious/go away...
> >>
rent, or if anyone is aware of anything upcoming
FS> to
>> make the issue more obvious/go away...
>>
>> > -Original Message-
>> > From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
>> > Sent: 05 February 2003 12:06
>> > To: [EMAIL PROTECTE
: singleton creation (ot)
Very nice reading, but I'm getting convinced that I should not use
Singleton pattern in my case... I just wonder what should I do then :-)
As I said, the method will be called millions of times... so I think
it shouldn't be synch'd (for performance). Certainl
;
> > -Original Message-
> > From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
> > Sent: 05 February 2003 12:06
> > To: [EMAIL PROTECTED]; Tomcat Users List
> > Subject: RE: singleton creation (ot)
> >
> >
> > Hmm... nice links!
> > The
'd love to hear different, or if anyone is aware of anything upcoming to
make the issue more obvious/go away...
> -Original Message-
> From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
> Sent: 05 February 2003 12:06
> To: [EMAIL PROTECTED]; Tomcat Users List
> Subje
s/collect
> ions/FastTreeMap.html
>
> (apologies for the wrap).
>
> Dan.
>
> > -Original Message-
> > From: Felipe Schnack [mailto:[EMAIL PROTECTED]]
> > Sent: 05 February 2003 11:21
> > To: Tomcat Users List
> > Subject: singleton creation (ot)
> >
Users List
> Subject: singleton creation (ot)
>
>
> I was wondering... this code is valid to avoid excessive use of
> synchronized code? I think so, but we never know :-)
> This is the default getInstance() method of a singleton (simplified):
>
> public Object getInstance(
I was wondering... this code is valid to avoid excessive use of
synchronized code? I think so, but we never know :-)
This is the default getInstance() method of a singleton (simplified):
public Object getInstance()
{
if (INSTANCE == null)
{
synchronized (this)
{
if (INSTANCE
10 matches
Mail list logo