It's not that big a piece of code being locked and to do it differently would require changing the locking mechanism in getClient also, which is much more complicated.