add mutex to NameGenerator