Hi,

In the same reference just prior to that quoted is a similar example
of eager initialisation also.

Just pointing out that it can be done without explicit locks in some
circumstances as well, but synchronized blocks or methods is probably
more commonly/historically used when there is not much actual
contention from multiple threads.

I think Diane's example is, as usual, best for typical use.

Regards

On Jun 9, 11:28 am, Chris <crehb...@gmail.com> wrote:
> What you quoted is quintessential initialization on-demand holder.  And its
> supposed to be more like _eager_ init, not lazy init.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to