mutex locks before checking for overflow