I generally like to move stuff like this to a separate method (with the synchronization) to isolate initialization and synchronization from everything else.