Use synchronized block with different object parameter.