change 'bool shouldUpdate' to mutex