Lock thread during init world.