Please dont introduce double check locking bugs !
On Feb 8, 2014 7:09 AM, "Aaron Davidson" <notifications@github.com> wrote:

> In core/src/main/scala/org/apache/spark/storage/BlockManager.scala:
>
> > @@ -92,7 +96,25 @@ private[spark] class BlockManager(
> >    // is pending. Accesses should synchronize on asyncReregisterLock.
> >    var asyncReregisterTask: Future[Unit] = null
> >    val asyncReregisterLock = new Object
> > -
> > +
> > +  private def getTachyonStore() : TachyonStore = {
>
> since it's frequently used, I'd recommend a
>
> if (!initialized) {
>   synchronized {
>     if (!initialized) {
>       initialize()
>     }
>   }
> }
>
> form for efficiency.
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/apache/incubator-spark/pull/468/files#r9561525>
> .
>