Github user srowen commented on the pull request:
https://github.com/apache/spark/pull/5508#issuecomment-92730223
These are slightly different ideas. I agree in practice here that there is
no visibility problem that volatile would solve that isn't already taken care
of by the memory barrier from `synchronized`. However I also don't imagine this
would cause any measurable overhead from the extra read. Have you measured some
improvement? If not, I am not sure this is worth changing since the moment this
field becomes read outside `synchronized` blocks it's technically unsafe again.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]