From: Nathan Bronson Date: Fri, 24 Jul 2015 21:57:33 +0000 (-0700) Subject: added a missing hook to IndexedMemPool's testing harness X-Git-Tag: v0.52.0~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30e9f34e93579b255767fc1680c81fcd9c023ba9;p=folly.git added a missing hook to IndexedMemPool's testing harness Summary: IndexedMemPool had one bare usage of std::atomic, rather than the templated type Atom. This doesn't affect any non-testing template instantiations, because those two are usually synonyms, but it could cause spurious failures of DeterministicSchedule tests. Found via inspection, not via failed tests. Reviewed By: @yfeldblum Differential Revision: D2277424 --- diff --git a/folly/IndexedMemPool.h b/folly/IndexedMemPool.h index e1b7e43e..437685a2 100644 --- a/folly/IndexedMemPool.h +++ b/folly/IndexedMemPool.h @@ -306,7 +306,7 @@ struct IndexedMemPool : boost::noncopyable { /// To allow use of atomic ++ instead of CAS, we let this overflow. /// The actual number of constructed elements is min(actualCapacity_, /// size_) - std::atomic size_; + Atom size_; /// raw storage, only 1..min(size_,actualCapacity_) (inclusive) are /// actually constructed. Note that slots_[0] is not constructed or used