[-v2] use synchronized instead of volatile