DM Smith <[EMAIL PROTECTED]> wrote:
> Hiroaki Kawai wrote:
> > DM Smith <[EMAIL PROTECTED]> wrote:
> >   
> >> On Jul 11, 2008, at 9:42 PM, Hiroaki Kawai wrote:
> >>
> >>     
> >>> Another suggestion from me:
> >>> How about making token object as an singleton?
> >>>       
> >> Would that work for a multi-threaded application?
> >>     
> >
> > Of cource. We should make that thread local singleton.
> >   
> 
> In core and contrib, there are times where more than one token is used 
> at a time. In a few places they are put into collections.
> 
> So a singleton wouldn't work.

I'd suggest a factory method to get a thread local singleton.
If one want to new a token, it may be possible, but it is not 
encouraged to do so. 
If there is more than one token, that is not good because 
we are focusing on reducing new object. Such code might be
refactored to be more simple.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to