Since your lock file name contains `$name`, how can a lock file contain multiple locks? Using a single lock file for multiple locks isn't good either because it means more unnecessary lock competition.