Why not just make this a lazy val?  They are thread safe and seem to do exactly what you want.