Tweaks to folly::call_once and folly::once_flag
authorYedidya Feldblum <yfeldblum@fb.com>
Sat, 30 Dec 2017 03:55:06 +0000 (19:55 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 30 Dec 2017 04:05:00 +0000 (20:05 -0800)
commit651b5bd9595baf178193d598c3da9c3e981a46e9
tree7d1edb9139fc10f1fe56e9aaac0d508cc1bbdc95
parente14ef53297ff23a1f3b1b01716708a416b080141
Tweaks to folly::call_once and folly::once_flag

Summary:
[Folly] Tweaks to `folly::call_once` and `folly::once_flag`.

In particular:
* Move the template class out of `detail`.
* Add parameterization by the atomic type.
* Expand the comments.

Reviewed By: Orvid

Differential Revision: D6637250

fbshipit-source-id: 3806580ca0badf8464f637750c4873b2aba9f916
folly/fibers/CallOnce.h
folly/synchronization/CallOnce.h
folly/synchronization/test/CallOnceBenchmark.cpp
folly/synchronization/test/CallOnceTest.cpp