~smspillaz/folly/folly-git-master

Viewing all changes in revision 6595.

  • Committer: Facebook Github Bot
  • Author(s): Joe Loser
  • Date: 2019-01-18 22:30:56 UTC
  • Revision ID: git-v1:05c10a5b70717c741eaae3c3415b3a43c8a9b358
Remove workaround for lack of std::atomic_init (#996)

Summary:
- Since GCC 5 and later has `std::atomic_init`, remove the workaround
  present in `Tearable.h` to default initialize atomic variables.
- Default initialization of atomics do not work as you would expect. See
  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0883r0.pdf
  for the explanation why.
- To get around the default initialization issue, we just call
  `std::atomic_init` for each element in the array of atomics.
Pull Request resolved: https://github.com/facebook/folly/pull/996

Reviewed By: LeeHowes

Differential Revision: D13648263

Pulled By: yfeldblum

fbshipit-source-id: 6f3c84089f9158bc5c0ad5efac13d49ef69f1770

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: